fix @rust functions
This commit is contained in:
parent
18162ee5cb
commit
85fee81d74
4 changed files with 386 additions and 367 deletions
|
@ -29,7 +29,7 @@ module.exports = grammar({
|
||||||
function_definition: $ => choice($.func, $.block),
|
function_definition: $ => choice($.func, $.block),
|
||||||
func: $ => seq(
|
func: $ => seq(
|
||||||
'func', $._spacing,
|
'func', $._spacing,
|
||||||
$.identifier, $._spacing, choice(seq('@', $.identifier, '{', $._spacing, repeat(choice(/./, $._spacing)), $._spacing, '}'), $.block),
|
$.identifier, $._spacing, choice(seq('@', $.identifier, '!{', $._spacing, repeat(choice(/./, $._spacing)), $._spacing, '}'), $.block),
|
||||||
),
|
),
|
||||||
block: $ => seq(
|
block: $ => seq(
|
||||||
'{', $._spacing, repeat(seq(/[^ \n\r\t|]+/, $._spacing)), '|',
|
'{', $._spacing, repeat(seq(/[^ \n\r\t|]+/, $._spacing)), '|',
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "STRING",
|
||||||
"value": "{"
|
"value": "!{"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SYMBOL",
|
"type": "SYMBOL",
|
||||||
|
|
|
@ -613,6 +613,10 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "!{",
|
||||||
|
"named": false
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "\"",
|
"type": "\"",
|
||||||
"named": false
|
"named": false
|
||||||
|
|
745
src/parser.c
745
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue