grammar: don't use immediate token in the escape sequence...
to fix first character in the connection path shape key Related #21
This commit is contained in:
parent
fdcb5613a5
commit
6b5e1d9123
6 changed files with 33 additions and 2 deletions
|
@ -419,7 +419,7 @@ module.exports = grammar({
|
||||||
_unescaped_double_string_fragment: ($) => token.immediate(/[^"\\\n]+/),
|
_unescaped_double_string_fragment: ($) => token.immediate(/[^"\\\n]+/),
|
||||||
|
|
||||||
escape_sequence: ($) =>
|
escape_sequence: ($) =>
|
||||||
token.immediate(
|
token(
|
||||||
seq(
|
seq(
|
||||||
"\\",
|
"\\",
|
||||||
choice(
|
choice(
|
||||||
|
|
|
@ -2155,7 +2155,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"escape_sequence": {
|
"escape_sequence": {
|
||||||
"type": "IMMEDIATE_TOKEN",
|
"type": "TOKEN",
|
||||||
"content": {
|
"content": {
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
|
|
BIN
src/parser.c
BIN
src/parser.c
Binary file not shown.
|
@ -245,3 +245,26 @@ Connection with espaced key fragments
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
================================================================================
|
||||||
|
Connection with espaced key fragments
|
||||||
|
================================================================================
|
||||||
|
\#hello\[\] -- \[world\]
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(connection
|
||||||
|
(shape_key
|
||||||
|
(escape_sequence)
|
||||||
|
(escape_sequence)
|
||||||
|
(escape_sequence)
|
||||||
|
)
|
||||||
|
(arrow)
|
||||||
|
(shape_key
|
||||||
|
(escape_sequence)
|
||||||
|
(escape_sequence)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
|
@ -3,6 +3,7 @@ Declare unquoted shape identifier with escape sequence (issue #21)
|
||||||
================================================================================
|
================================================================================
|
||||||
hello\[world\]
|
hello\[world\]
|
||||||
\#ello\[world\]
|
\#ello\[world\]
|
||||||
|
\# helloello\[world\]
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
(source_file
|
(source_file
|
||||||
|
@ -19,6 +20,13 @@ hello\[world\]
|
||||||
(escape_sequence)
|
(escape_sequence)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
(shape
|
||||||
|
(shape_key
|
||||||
|
(escape_sequence)
|
||||||
|
(escape_sequence)
|
||||||
|
(escape_sequence)
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue