parent
48f7e22475
commit
a4fb636b2d
|
@ -159,6 +159,7 @@ Command substitutions
|
||||||
echo `echo hi`
|
echo `echo hi`
|
||||||
echo `echo hi; echo there`
|
echo `echo hi; echo there`
|
||||||
echo $(echo $(echo hi))
|
echo $(echo $(echo hi))
|
||||||
|
echo $(< some-file)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -175,7 +176,10 @@ echo $(echo $(echo hi))
|
||||||
(command_name (word))
|
(command_name (word))
|
||||||
(command_substitution (command
|
(command_substitution (command
|
||||||
(command_name (word))
|
(command_name (word))
|
||||||
(word)))))))
|
(word))))))
|
||||||
|
(command
|
||||||
|
(command_name (word))
|
||||||
|
(command_substitution (file_redirect (word)))))
|
||||||
|
|
||||||
=============================
|
=============================
|
||||||
Process substitutions
|
Process substitutions
|
||||||
|
|
|
@ -472,6 +472,7 @@ module.exports = grammar({
|
||||||
|
|
||||||
command_substitution: $ => choice(
|
command_substitution: $ => choice(
|
||||||
seq('$(', $._statements, ')'),
|
seq('$(', $._statements, ')'),
|
||||||
|
seq('$(', $.file_redirect, ')'),
|
||||||
prec(1, seq('`', $._statements, '`'))
|
prec(1, seq('`', $._statements, '`'))
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
@ -2000,6 +2000,23 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "SEQ",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "$("
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "SYMBOL",
|
||||||
|
"name": "file_redirect"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "STRING",
|
||||||
|
"value": ")"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "PREC",
|
"type": "PREC",
|
||||||
"value": 1,
|
"value": 1,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue