Allow square brackets after first character in shell fragment
This commit is contained in:
parent
ca57ec244a
commit
00c68f09db
|
@ -8,3 +8,4 @@ Maintainer camden@ccheek.com
|
||||||
|
|
||||||
(source_file
|
(source_file
|
||||||
(maintainer_instruction))
|
(maintainer_instruction))
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ module.exports = grammar({
|
||||||
),
|
),
|
||||||
|
|
||||||
shell_fragment: $ => repeat1(choice(
|
shell_fragment: $ => repeat1(choice(
|
||||||
/[^\\\[\n#\s][^\\\[\n]*/,
|
/[^\\\[\n#\s][^\\\n]*/,
|
||||||
/\\[^\n]/,
|
/\\[^\n]/,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
|
|
|
@ -1314,7 +1314,7 @@
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
"value": "[^\\\\\\[\\n#\\s][^\\\\\\[\\n]*"
|
"value": "[^\\\\\\[\\n#\\s][^\\\\\\n]*"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
|
|
|
@ -2457,7 +2457,6 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
||||||
ACCEPT_TOKEN(aux_sym_shell_fragment_token1);
|
ACCEPT_TOKEN(aux_sym_shell_fragment_token1);
|
||||||
if (lookahead != 0 &&
|
if (lookahead != 0 &&
|
||||||
lookahead != '\n' &&
|
lookahead != '\n' &&
|
||||||
lookahead != '[' &&
|
|
||||||
lookahead != '\\') ADVANCE(225);
|
lookahead != '\\') ADVANCE(225);
|
||||||
END_STATE();
|
END_STATE();
|
||||||
case 226:
|
case 226:
|
||||||
|
|
Loading…
Reference in a new issue