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]+/)), "`")
|
||||
),
|
||||
|
||||
line_comment: ($) => token(seq("#", /.*/)),
|
||||
line_comment: ($) => token(prec(-2, seq("#", /.*/))),
|
||||
|
||||
_word: ($) => /[\w\d]+/,
|
||||
|
||||
|
|
|
@ -1122,17 +1122,21 @@
|
|||
"line_comment": {
|
||||
"type": "TOKEN",
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "#"
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": ".*"
|
||||
}
|
||||
]
|
||||
"type": "PREC",
|
||||
"value": -2,
|
||||
"content": {
|
||||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "#"
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": ".*"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"_word": {
|
||||
|
|
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