-
-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
(If this isn't the right place to report this, please let me know!)
Revision: 56b54c6
Reference: https://www.gnu.org/software/bash/manual/bash.html#Command-Substitution-1
tree-sitter version: 0.25.6 (used via Neovim v0.11.3)
Minimal examples:
Click to expand
#!/usr/bin/env bash
echo "${ echo foo; }"It currently parses as:
(program ; [0, 0] - [3, 0]
(comment) ; [0, 0] - [0, 19]
(command ; [2, 0] - [2, 21]
name: (command_name ; [2, 0] - [2, 4]
(word)) ; [2, 0] - [2, 4]
argument: (string ; [2, 5] - [2, 21]
(expansion ; [2, 6] - [2, 20]
(variable_name) ; [2, 9] - [2, 13]
(ERROR ; [2, 13] - [2, 18]
(word)))))) ; [2, 14] - [2, 17]
Click to expand
#!/usr/bin/env bash
echo "${| REPLY=12345; }"It currently parses as:
(program ; [0, 0] - [3, 0]
(comment) ; [0, 0] - [0, 19]
(command ; [2, 0] - [2, 25]
name: (command_name ; [2, 0] - [2, 4]
(word)) ; [2, 0] - [2, 4]
argument: (string ; [2, 5] - [2, 25]
(ERROR ; [2, 6] - [2, 24]
(word))))) ; [2, 8] - [2, 23]
Click to expand
#!/usr/bin/env bash
echo "${
echo "${
echo foo
}"
}"It currently parses as:
(program ; [0, 0] - [7, 0]
(comment) ; [0, 0] - [0, 19]
(command ; [2, 0] - [6, 2]
name: (command_name ; [2, 0] - [2, 4]
(word)) ; [2, 0] - [2, 4]
argument: (concatenation ; [2, 5] - [6, 2]
(string ; [2, 5] - [3, 8]
(ERROR ; [2, 6] - [3, 6]
(variable_name))) ; [3, 2] - [3, 6]
(expansion ; [3, 8] - [5, 3]
(variable_name) ; [4, 4] - [4, 8]
(ERROR ; [4, 9] - [4, 12]
(word))) ; [4, 9] - [4, 12]
(string ; [5, 3] - [6, 2]
(string_content))))) ; [6, 0] - [6, 1]
TheBill2001
Metadata
Metadata
Assignees
Labels
No labels