flash: Switch shell parser to brush - #270
Merged
Merged
Conversation
Just a crude first attempt to use brush as the shell syntax parser. Still doing something a little weird with quotes...
Sensibly, `brush_parser` leaves the syntax for "words" (e.g., command arguments) unparsed in the AST. So we have to explicitly parse those too and flatten them into a string. A real shell would do all sorts of expansion, such as for `$FOO` variable references, but we do none of that and just try to extract the text.
It's the grand payoff for switching shell parsers!!! :/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This switches the shell syntax parser from flash to brush-parser. Aside from resolving some naming confusion (I totally stole flash's name idea), this makes our shell syntax a bit more compatible out of the box. For example, breaking a command across multiple lines like this:
…didn't previously work; now it does. And in general, brush seems to be an active project, so I am a little more optimistic about things getting fixed in the future.