Parse ranges + concat is "++"

This commit is contained in:
2026-04-30 19:32:23 -06:00
parent b29c25d9dc
commit 8d08273330
5 changed files with 1968 additions and 1891 deletions

View File

@@ -155,7 +155,7 @@ export default grammar({
binary_expr: $ => choice(
expr_prec($.expr, 4, choice("*", "/")),
expr_prec($.expr, 3, choice("+", "-")),
expr_prec($.expr, 2, ".."),
expr_prec($.expr, 2, choice("..", "++")),
expr_prec($.expr, 1, choice("=", "!=", ">=", "<=", "<", ">")),
expr_prec($.expr, 0, choice("&&", "||")),
),

View File

@@ -962,8 +962,17 @@
"type": "FIELD",
"name": "op",
"content": {
"type": "STRING",
"value": ".."
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ".."
},
{
"type": "STRING",
"value": "++"
}
]
}
},
{

View File

@@ -131,6 +131,10 @@
"type": "+",
"named": false
},
{
"type": "++",
"named": false
},
{
"type": "-",
"named": false
@@ -639,6 +643,10 @@
"type": "+",
"named": false
},
{
"type": "++",
"named": false
},
{
"type": ",",
"named": false

File diff suppressed because it is too large Load Diff