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
|
||||
(maintainer_instruction))
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ module.exports = grammar({
|
|||
),
|
||||
|
||||
shell_fragment: $ => repeat1(choice(
|
||||
/[^\\\[\n#\s][^\\\[\n]*/,
|
||||
/[^\\\[\n#\s][^\\\n]*/,
|
||||
/\\[^\n]/,
|
||||
)),
|
||||
|
||||
|
|
|
@ -1314,7 +1314,7 @@
|
|||
"members": [
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "[^\\\\\\[\\n#\\s][^\\\\\\[\\n]*"
|
||||
"value": "[^\\\\\\[\\n#\\s][^\\\\\\n]*"
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
|
|
|
@ -2457,7 +2457,6 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
|||
ACCEPT_TOKEN(aux_sym_shell_fragment_token1);
|
||||
if (lookahead != 0 &&
|
||||
lookahead != '\n' &&
|
||||
lookahead != '[' &&
|
||||
lookahead != '\\') ADVANCE(225);
|
||||
END_STATE();
|
||||
case 226:
|
||||
|
|
Loading…
Reference in a new issue