Commit Graph

21 Commits

Author SHA1 Message Date
Jason Rudolph 4f3cbc36b9 Handle heredoc delimiters that include spaces (#47)
* Handle heredoc delimiters that include spaces

* Update test to use multi-line heredoc to demonstrate bug

This change demonstrates the bug described in 
https://github.com/tree-sitter/tree-sitter-bash/pull/47#discussion_r280183823.

* Handle multi-line heredocs with spaces in delimiter

Fixes the failing test introduced in 0d8adbc335.

/xref https://github.com/tree-sitter/tree-sitter-bash/pull/47#discussion_r280183823
2019-05-01 13:59:21 -07:00
Max Brunsfeld 53446e0e81 Handle heredocs followed by pipes or redirects
Fixes atom/language-shellscript#134
2019-04-18 15:25:40 -07:00
Max Brunsfeld da116a1941 Handle heredocs w/ indented close delimiters
Fixes atom/language-shellscript#127
2018-10-19 13:06:56 -07:00
Max Brunsfeld bdaf31057b Add raw (quoted) heredocs
Fixes #31
2018-10-18 12:55:14 -07:00
Max Brunsfeld 46cf157ad8 Handle escaped expansions in heredocs
Fixes #28
2018-10-18 11:12:48 -07:00
Max Brunsfeld cdbc8863cd Allow compound statements and redirects in more places
Fixes #35
2018-10-18 11:06:03 -07:00
Max Brunsfeld 065a4ec425 Rework test expressions
Fixes #11
2018-05-24 11:47:12 -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
Mads Hartmann 8ca2ecd52d Add support for exporting environment variables (#4)
* Add support for exporting environment variables

* Support multiple exports in one command

Also improves the structure of the AST so the variable name and the
assigned expression aren't free-floating

* Allow for multiple declarations in local declarations as well

Simplify the generated nodes.

* Commit generated code

* Consolidate declarations into a single declaration_command

This also adds support for declare, typeset, and readonly

* Rename environment_variable_assignment to variable_assignment
2018-02-27 13:22:28 -08:00
Max Brunsfeld dce4ee6937 Handle words concatenated with strings and expansions 2017-07-17 10:47:34 -07:00
Max Brunsfeld 1b5e1557f2 Reorganize, rename a bunch of things 2017-07-15 22:13:55 -07:00
Max Brunsfeld 66693d7575 Add empty environment variable values 2017-07-14 17:41:14 -07:00
Max Brunsfeld 5446533c20 Add quoted command names, subshells 2017-07-14 17:32:55 -07:00
Max Brunsfeld a0406c8906 Fix distinction between numeric args and redirect file descriptors 2017-07-14 17:14:23 -07:00
Max Brunsfeld 86e67f9403 Add quoted arguments, bracket expressions 2017-07-14 16:47:25 -07:00
Max Brunsfeld cce4a65d33 Add while statements 2017-07-14 16:11:35 -07:00
Max Brunsfeld a46748839e Add variable expansion inside of heredocs 2017-07-14 14:27:13 -07:00
Max Brunsfeld 6be8857926 Start work on heredocs 2017-07-14 13:54:05 -07:00
Max Brunsfeld d2ac184c81 Add variable expansions 2017-07-14 13:00:41 -07:00
Max Brunsfeld af279907bb Add file redirects 2017-07-14 12:43:42 -07:00
Max Brunsfeld ab1d553e1d Initial commit 2017-07-14 12:28:54 -07:00