Skip to content

Commit eb3a20e

Browse files
committed
fixed
1 parent c0add28 commit eb3a20e

File tree

6 files changed

+1075
-869
lines changed

6 files changed

+1075
-869
lines changed

grammar.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ module.exports = grammar({
121121
$._indent,
122122
$.run_key,
123123
$._equals,
124-
alias($.anything, $.command)
124+
alias($._command_or_text, $.command)
125125
),
126126

127127
// -- OPTIONAL DESC KEY-VALUE
@@ -130,7 +130,7 @@ module.exports = grammar({
130130
$._indent,
131131
$.desc_key,
132132
$._equals,
133-
alias($.anything, $.text)
133+
alias($._command_or_text, $.text)
134134
),
135135

136136
// -- OPTIONAL ALIAS KEY-VALUE
@@ -167,11 +167,14 @@ module.exports = grammar({
167167
)
168168
),
169169

170-
comment: $ => token(seq(token("//"), /.*/)),
170+
comment: $ => token(seq('//', /[^\r\n]*/)),
171171

172-
anything: $ => prec.right(
172+
_command_or_text: $ => prec.right(
173173
repeat1(
174-
/[A-Za-z0-9_./:~+=@%*\-?!$'"`&|<>(){}\[\]\\; \t]/
174+
choice(
175+
token.immediate(/[^\n\r/]+/),
176+
token.immediate('/')
177+
)
175178
)
176179
),
177180
}

src/grammar.json

Lines changed: 23 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/node-types.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)