set precedence for value evaluation

This commit is contained in:
Preston Baxter 2024-01-26 09:58:46 -06:00
parent 355479a481
commit 27a83e9fa1
3 changed files with 2366 additions and 2232 deletions

View File

@ -141,11 +141,11 @@ module.exports = grammar({
value: $ => choice(
prec(10, $.plugin),
prec(9, $.bareword),
$.string,
$.number,
$.boolean,
$.array,
$.hash
prec(8, $.string),
prec(7, $.number),
prec(7, $.boolean),
prec(6, $.array),
prec(5, $.hash)
),
array_value: $ => choice(

View File

@ -738,24 +738,44 @@
}
},
{
"type": "SYMBOL",
"name": "string"
"type": "PREC",
"value": 8,
"content": {
"type": "SYMBOL",
"name": "string"
}
},
{
"type": "SYMBOL",
"name": "number"
"type": "PREC",
"value": 7,
"content": {
"type": "SYMBOL",
"name": "number"
}
},
{
"type": "SYMBOL",
"name": "boolean"
"type": "PREC",
"value": 7,
"content": {
"type": "SYMBOL",
"name": "boolean"
}
},
{
"type": "SYMBOL",
"name": "array"
"type": "PREC",
"value": 6,
"content": {
"type": "SYMBOL",
"name": "array"
}
},
{
"type": "SYMBOL",
"name": "hash"
"type": "PREC",
"value": 5,
"content": {
"type": "SYMBOL",
"name": "hash"
}
}
]
},

File diff suppressed because it is too large Load Diff