Fixes #39
This commit is contained in:
Max Brunsfeld 2019-04-18 15:46:58 -07:00
parent e9748c132b
commit 15a3a168f0
4 changed files with 4524 additions and 4365 deletions

View File

@ -41,7 +41,7 @@ echo $abc
Special variable expansions Special variable expansions
============================= =============================
echo $# $* $@ echo $# $* $@ $!
--- ---
@ -50,6 +50,7 @@ echo $# $* $@
(command_name (word)) (command_name (word))
(simple_expansion (special_variable_name)) (simple_expansion (special_variable_name))
(simple_expansion (special_variable_name)) (simple_expansion (special_variable_name))
(simple_expansion (special_variable_name))
(simple_expansion (special_variable_name)))) (simple_expansion (special_variable_name))))
============================= =============================

View File

@ -450,6 +450,7 @@ module.exports = grammar({
choice( choice(
$._simple_variable_name, $._simple_variable_name,
$._special_variable_name, $._special_variable_name,
alias('!', $.special_variable_name),
alias('#', $.special_variable_name) alias('#', $.special_variable_name)
) )
), ),

9
src/grammar.json vendored
View File

@ -1884,6 +1884,15 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "_special_variable_name" "name": "_special_variable_name"
}, },
{
"type": "ALIAS",
"content": {
"type": "STRING",
"value": "!"
},
"named": true,
"value": "special_variable_name"
},
{ {
"type": "ALIAS", "type": "ALIAS",
"content": { "content": {

8876
src/parser.c vendored

File diff suppressed because it is too large Load Diff