lua: unary-minus/^ precedence (^ binds tighter); parse-pow-chain helper +3 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

This commit is contained in:
2026-04-24 21:38:01 +00:00
parent 9560145228
commit b1bed8e0e5
5 changed files with 51 additions and 30 deletions

View File

@@ -211,6 +211,8 @@
(lua-tok-type t)
" "
(lua-tok-value t))))))))
(define parse-pow-chain
(fn () (let ((lhs (parse-primary))) (parse-binop-rhs 10 lhs))))
(set!
parse-unary
(fn
@@ -228,7 +230,7 @@
(begin
(advance-tok!)
(list (quote lua-unop) "not" (parse-unary))))
(else (parse-primary)))))
(else (parse-pow-chain)))))
(define
parse-binop-rhs
(fn