parent
4fdf38aebe
commit
b9fa5785b4
6 changed files with 55 additions and 24 deletions
|
@ -130,10 +130,12 @@ module.exports = grammar({
|
|||
|
||||
_identifier: ($) =>
|
||||
seq(
|
||||
optional("-"),
|
||||
/[\w\d$]/,
|
||||
choice(/[\w\d$-]/, $.escape_sequence),
|
||||
repeat(
|
||||
choice(
|
||||
$.escape_sequence,
|
||||
token(prec(PREC.IDENTIFIER, /([\w\d'"$(),]+)?( +|-)[\w\d'"$()]+/))
|
||||
)
|
||||
),
|
||||
optional(/[\w\d'"$()]+/),
|
||||
optional($._dash)
|
||||
|
|
|
@ -539,21 +539,25 @@
|
|||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "-"
|
||||
"type": "PATTERN",
|
||||
"value": "[\\w\\d$-]"
|
||||
},
|
||||
{
|
||||
"type": "BLANK"
|
||||
"type": "SYMBOL",
|
||||
"name": "escape_sequence"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "[\\w\\d$]"
|
||||
},
|
||||
{
|
||||
"type": "REPEAT",
|
||||
"content": {
|
||||
"type": "CHOICE",
|
||||
"members": [
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
"name": "escape_sequence"
|
||||
},
|
||||
{
|
||||
"type": "TOKEN",
|
||||
"content": {
|
||||
"type": "PREC",
|
||||
|
@ -564,6 +568,8 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
|
|
|
@ -183,9 +183,13 @@
|
|||
"named": true,
|
||||
"fields": {},
|
||||
"children": {
|
||||
"multiple": false,
|
||||
"multiple": true,
|
||||
"required": false,
|
||||
"types": [
|
||||
{
|
||||
"type": "escape_sequence",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"named": true
|
||||
|
@ -249,9 +253,13 @@
|
|||
"named": true,
|
||||
"fields": {},
|
||||
"children": {
|
||||
"multiple": false,
|
||||
"multiple": true,
|
||||
"required": false,
|
||||
"types": [
|
||||
{
|
||||
"type": "escape_sequence",
|
||||
"named": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"named": true
|
||||
|
@ -336,10 +344,6 @@
|
|||
"type": "'",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "-",
|
||||
"named": false
|
||||
},
|
||||
{
|
||||
"type": "3d",
|
||||
"named": false
|
||||
|
|
BIN
src/parser.c
BIN
src/parser.c
Binary file not shown.
|
@ -226,3 +226,22 @@ foo.baz: {
|
|||
)
|
||||
)
|
||||
)
|
||||
|
||||
================================================================================
|
||||
Connection with espaced key fragments
|
||||
================================================================================
|
||||
\#(hello)- -- b\#-world
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
(source_file
|
||||
(connection
|
||||
(shape_key
|
||||
(escape_sequence)
|
||||
)
|
||||
(arrow)
|
||||
(shape_key
|
||||
(escape_sequence)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue