bash-parser
bash-parser copied to clipboard
Parses bash into an AST
It seems that variable substitutions are not parsed, they are single expressions. I think that they should be split up if this to be a full bash parser. replace: ```...
Currently comments are removed and do not show up in the AST. For certain use cases (e.g. building a converter from bash to win batch scripts) it'd be useful to...
Hey, cool module. 🙂 It would be nice if you could run it via the CLI. This PR adds some basic CLI support, so you can run bash-parser like so:...
A simple arithmetic operation like ((b++)) is classified as a subshell. This is not correct.
This is a list of features to implement in the `bash` mode. See https://www.gnu.org/software/bash/manual/html_node/Major-Differences-From-The-Bourne-Shell.html#Major-Differences-From-The-Bourne-Shell - [X] alias expansion should be applied to reserved word - [ ] tilde expansion should...
Hey, awesome job on `bash-parser`. I'm finding this extremely useful in my own work. I've run into an issue when parsing `)` and `$` characters in quoted strings. Let me...
https://runkit.com/cspotcode/5d6dbd91909e38001b72c4b7 bash can encode string literals like this: `$'foo'` For example, `printf %q foo$'\n'bar` will choose to encode in this style: `$'foo\nbar'` bash-parser doesn't seem to parse this.
```javascript= > var parse = require('bash-parser') undefined > parse('echo };') Error: Parse error on line 1: Unexpected 'Rbrace' ``` However, this seems to be valid: ```bash= $ echo }; }...
Added test with correct AST for 'echo 1' #45
@parro-it since here-docs are a different beast than here-strings (#49), could you comment on what would be required to implement? I'm not familiar with Bison and neither have a good...