Skip to content

Better parsing of ONBUILD #21

@dsherret

Description

@dsherret

The ONBUILD instruction has the format:

ONBUILD <INSTRUCTION>

https://docs.docker.com/engine/reference/builder/#onbuild

It would probably be better to not parse this as a MiscInstruction, but instead it could have the form:

struct OnbuildInstruction {
  span: Span,
  instruction: Instruction,
}

I'm building a code formatter with this parser and it would be useful to format the instructions within an ONBUILD instruction.

Thoughts? I can contribute this after my other PR lands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions