fix call-exprs with spacing

This commit is contained in:
Daniella / Tove 2024-11-22 13:11:53 +01:00
parent 1a197b26ab
commit 90a1d25747
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
3 changed files with 1877 additions and 1758 deletions

View file

@ -56,7 +56,7 @@ module.exports = grammar({
number: $ => token(prec(10, /\d+(\.\d+)?/)), number: $ => token(prec(10, /\d+(\.\d+)?/)),
ministring: $ => token(prec(10, seq('^', /[^ \n\r\t<>:;&{}"'\[\],]+/))), ministring: $ => token(prec(10, seq('^', /[^ \n\r\t<>:;&{}"'\[\],]+/))),
string: $ => seq('"', repeat(choice(/\\./, /./)), '"'), string: $ => seq('"', repeat(choice(/\\./, /./)), '"'),
call_expr: $ => seq('<', optional($._spacing), repeat($._statement), $._unspaced_statement, '>'), call_expr: $ => seq('<', optional($._spacing), repeat($._statement), $._unspaced_statement, optional($._spacing), '>'),
with_expr: $ => seq( with_expr: $ => seq(
'with', $._spacing, 'with', $._spacing,
repeat(seq($.identifier, $._spacing)), repeat(seq($.identifier, $._spacing)),

View file

@ -421,6 +421,18 @@
"type": "SYMBOL", "type": "SYMBOL",
"name": "_unspaced_statement" "name": "_unspaced_statement"
}, },
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_spacing"
},
{
"type": "BLANK"
}
]
},
{ {
"type": "STRING", "type": "STRING",
"value": ">" "value": ">"

File diff suppressed because it is too large Load diff