Parser 2.0 (Major Delezer) #52

Merged
defunkt merged 35 commits from parser2 into main 2025-12-08 16:35:34 +00:00
Showing only changes of commit 6a6675d30f - Show all commits

View File

@ -380,23 +380,25 @@ export const precedence: Record<string, number> = {
// Nullish coalescing
'??': 35,
Review

This seems easier to understand than in the lezer file!

This seems easier to understand than in the lezer file!
// Bitwise shifts (lower precedence than addition)
'<<': 37,
'>>': 37,
'>>>': 37,
// Addition/Subtraction
'+': 40,
'-': 40,
// Bitwise AND/OR/XOR (higher precedence than addition)
'band': 45,
'bor': 45,
'bxor': 45,
// Multiplication/Division/Modulo
'*': 50,
'/': 50,
'%': 50,
// Bitwise
'band': 45,
'bor': 45,
'bxor': 45,
'<<': 45,
'>>': 45,
'>>>': 45,
// Exponentiation (right-associative)
'**': 60,
}