fix: precedence of unary operators and expressions

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
This commit is contained in:
Michael Hoffmann
2025-03-30 13:33:58 +02:00
parent 009def4ae3
commit 28e327cd3f
15 changed files with 7189 additions and 6812 deletions

84
src/grammar.json generated
View File

@@ -124,7 +124,8 @@
"members": [
{
"type": "PATTERN",
"value": "\\p{ID_Start}"
"value": "\\p{ID_Start}",
"flags": "u"
},
{
"type": "STRING",
@@ -139,7 +140,8 @@
"members": [
{
"type": "PATTERN",
"value": "\\p{ID_Continue}"
"value": "\\p{ID_Continue}",
"flags": "u"
},
{
"type": "STRING",
@@ -204,43 +206,55 @@
"name": "operation"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expr_term"
},
{
"type": "SYMBOL",
"name": "index"
}
]
"type": "PREC_RIGHT",
"value": 8,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expr_term"
},
{
"type": "SYMBOL",
"name": "index"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expr_term"
},
{
"type": "SYMBOL",
"name": "get_attr"
}
]
"type": "PREC_RIGHT",
"value": 8,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expr_term"
},
{
"type": "SYMBOL",
"name": "get_attr"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expr_term"
},
{
"type": "SYMBOL",
"name": "splat"
}
]
"type": "PREC_RIGHT",
"value": 8,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_expr_term"
},
{
"type": "SYMBOL",
"name": "splat"
}
]
}
},
{
"type": "SEQ",

6827
src/parser.c generated

File diff suppressed because it is too large Load Diff