dockerfile-parser-rs
dockerfile-parser-rs copied to clipboard
Better parsing of ONBUILD
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.