Commit Graph

99 Commits

Author SHA1 Message Date
Kenneth Skovhus 886a957d1e Add support for strings ending with $ (#24) 2018-08-02 16:32:30 -07:00
Max Brunsfeld 0f29cf2972 0.13.1 2018-07-23 11:01:35 -07:00
Max Brunsfeld 56805a357f Add enrypted token for prebuild uploads on travis and appveyor 2018-07-23 11:01:32 -07:00
Stafford Brunk 5f6591e1ac Prebuild support (#20)
* Add prebuild support

* Add prebuild-install support

* Add repository field to package.json
2018-07-22 11:13:32 -07:00
Max Brunsfeld 9c446b3d70 0.13.0 2018-07-18 13:19:46 -07:00
Max Brunsfeld 7873b864b1 ⬆️ tree-sitter-cli (new ABI version) 2018-07-18 13:19:42 -07:00
Max Brunsfeld d4d694d66c 0.12.0 2018-06-15 14:05:31 -07:00
Max Brunsfeld 44b3de2594 ⬆️ tree-sitter-cli, add explicit word token 2018-06-15 14:05:05 -07:00
Max Brunsfeld 7b003599b3 Allow subshells in negated commands
Fixes #13
2018-05-24 15:00:53 -07:00
Max Brunsfeld 9544a6c959 0.11.2 2018-05-24 11:57:20 -07:00
Max Brunsfeld 53688f6034 ⬆️ tree-sitter-cli 2018-05-24 11:57:14 -07:00
Max Brunsfeld 065a4ec425 Rework test expressions
Fixes #11
2018-05-24 11:47:12 -07:00
Max Brunsfeld 7902804460 0.11.1 2018-05-24 10:15:49 -07:00
Max Brunsfeld cf49f3972f Use node 8 on travis 2018-05-24 10:12:12 -07:00
Max Brunsfeld bd788c8a7e Add appveyor badge to README 2018-05-24 10:09:19 -07:00
Max Brunsfeld 76a1f89e1d Add appveyor.yml 2018-05-24 10:08:20 -07:00
Max Brunsfeld 9d7da69b7c ⬆️ nan 2018-05-24 10:07:14 -07:00
Max Brunsfeld 73d6705bc2 Allow other redirects between a heredoc's delimiter and body
Fixes #16
2018-03-29 09:54:08 -07:00
Max Brunsfeld 51af55f6d8 0.11.0 2018-03-28 11:18:40 -07:00
Max Brunsfeld f478eaddb3 ⬆️ tree-sitter-cli 2018-03-28 11:18:32 -07:00
Max Brunsfeld 2d96fc5fcb Add more code to the case statements test 2018-03-16 15:41:09 -07:00
Max Brunsfeld b207579a5a 0.6.0 2018-03-05 17:44:38 -08:00
Max Brunsfeld 90552dc38b ⬆️ tree-sitter 2018-03-05 17:44:34 -08:00
Max Brunsfeld 98123999d3 0.5.5 2018-03-02 10:18:51 -08:00
Max Brunsfeld 68e93bd898 Allow for statements without in clauses 2018-03-02 10:18:42 -08:00
Max Brunsfeld 16b90823a2 0.5.4 2018-03-01 14:23:12 -08:00
Max Brunsfeld 87a832d94e Allow regexes after '==', not just '=~' 2018-03-01 14:22:38 -08:00
Max Brunsfeld 30844a0381 Allow $'\n' (whatever that is) 2018-03-01 14:15:15 -08:00
Max Brunsfeld c7484ad85f Allow ;; at end of line of case item 2018-03-01 14:04:29 -08:00
Max Brunsfeld 27b4b7835e Add update-known-failures script 2018-03-01 13:30:24 -08:00
Max Brunsfeld ae2eee1dc2 0.5.3 2018-03-01 11:22:35 -08:00
Max Brunsfeld 299c806538 Include known failures from bash-it's submodules 2018-03-01 11:16:35 -08:00
Max Brunsfeld c92b80e807 Parse a bunch of files from bash-it on CI 2018-03-01 11:10:20 -08:00
Max Brunsfeld 51b212b207 Allow redirects after bracket commands 2018-03-01 10:42:20 -08:00
Max Brunsfeld 0791027596 Add regex syntax inside of expansions 2018-03-01 10:41:16 -08:00
Max Brunsfeld f33bf06de2 Distinguish unset commands from regular commands 2018-03-01 10:12:10 -08:00
Max Brunsfeld 69d64558a3 Rename control_flow test file to statements 2018-03-01 10:06:38 -08:00
Max Brunsfeld 5f65fac523 0.5.2 2018-03-01 10:04:22 -08:00
Max Brunsfeld 384d920af5 Allow $ in strings 2018-03-01 09:54:08 -08:00
Max Brunsfeld c7e42b8e96 Add special lexing for regexes after `=~` 2018-03-01 09:53:10 -08:00
Max Brunsfeld 0d9f854862 Revert "Don't parse square bracket commands as special syntax"
This reverts commit c34619a1c4.

Bracket command syntax was actually not interfering with the parsing
of words with special characters.
2018-02-28 22:46:47 -08:00
Max Brunsfeld 4920373ca4 Add special variable @, expressions in declarations 2018-02-28 17:32:48 -08:00
Mads Hartmann b13862adec Bump version to 0.5.1 (#3) 2018-02-28 16:48:23 -08:00
Max Brunsfeld 87b3276186 Generalize case statement parsing
* Fix handling of '|' in case items
* Don't require ;; for last case item

Fixes #8
2018-02-28 16:29:42 -08:00
Max Brunsfeld 2a5b01b885 Generalize parsing of expansion operators 2018-02-28 16:28:55 -08:00
Max Brunsfeld 86c5561ba8 Allow file redirects on while statements 2018-02-28 16:28:30 -08:00
Max Brunsfeld 6f81608535 Always lex braces and brackets as separate tokens
The lexer needs to always return braces and brackets separately so that
the parser can decide if they are part of some construct like an array
subscript or a variable expansion. This means that there was no point
in moving bare-word tokenization into the external scanner. I've moved
it back into the normal scanner.

The tricky part is how to deal with the separate '}' and ']' tokens
in the case where they are *not* part of a subscript or an expansion.
For example, in code like `echo {hi}`, the syntax tree should still
clearly indicate that only *one* argument is being passed to echo.
For now, we achieve this by grouping the '{', hi, and '}' tokens into
a single `concatenation` node, which is a bit odd, but it's the best
we can do.
2018-02-28 14:33:50 -08:00
Max Brunsfeld c34619a1c4 Don't parse square bracket commands as special syntax 2018-02-28 14:32:58 -08:00
Mads Hartmann c410548caf Handle escape sequences in strings (#7)
This should fix #6
2018-02-28 12:15:05 -08:00
Max Brunsfeld 675a581839 Allow special characters in bare word arguments
I've moved tokenization of bare words into the external scanner. This
way we can keep the grammar simple, but support some fancy rules that
I've inferred from experimenting with bash:

- Only allow '}' inside of a bare word if '}' isn't a valid lookahead
token (i.e. we're not inside of a variable expansion).
- Only allow ']' at the *start* of a bare word if neither ']' nor ']]'
are valid lookahead tokens (i.e. we're not inside of a square bracket
command or an array subscript).
- Parentheses seem to never be allowed in bare words. You have to quote
them.

For alphanumeric words, I fall through to the normal scanner so that it
can continue to distinguish reserved words from other words.

Fixes #5
2018-02-27 16:55:20 -08:00