fix comment in string
This commit is contained in:
parent
1a4be28021
commit
90bb1822c1
4 changed files with 27 additions and 12 deletions
|
@ -188,7 +188,7 @@ module.exports = grammar({
|
||||||
seq("`", repeat(token.immediate(/[^`\n]+/)), "`")
|
seq("`", repeat(token.immediate(/[^`\n]+/)), "`")
|
||||||
),
|
),
|
||||||
|
|
||||||
line_comment: ($) => token(seq("#", /.*/)),
|
line_comment: ($) => token(prec(-2, seq("#", /.*/))),
|
||||||
|
|
||||||
_word: ($) => /[\w\d]+/,
|
_word: ($) => /[\w\d]+/,
|
||||||
|
|
||||||
|
|
|
@ -1121,6 +1121,9 @@
|
||||||
},
|
},
|
||||||
"line_comment": {
|
"line_comment": {
|
||||||
"type": "TOKEN",
|
"type": "TOKEN",
|
||||||
|
"content": {
|
||||||
|
"type": "PREC",
|
||||||
|
"value": -2,
|
||||||
"content": {
|
"content": {
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
|
@ -1134,6 +1137,7 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"_word": {
|
"_word": {
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
|
|
BIN
src/parser.c
BIN
src/parser.c
Binary file not shown.
|
@ -97,3 +97,14 @@ foo.style: { opacity: 5 }
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
Color in string
|
||||||
|
================================================================================
|
||||||
|
foo.style.fill: "#ffffff";
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(shape_key) (dot) (attr_key) (dot) (attr_key) (attr_value (string))
|
||||||
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue