mirror of https://github.com/japl-lang/japl.git
Made exponentiation higher precedence than multiplication
Fixed shebang
This commit is contained in:
parent
de65ca3374
commit
9e4329981c
2
build.py
2
build.py
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2020 Mattia Giambirtone
|
||||
#
|
||||
|
|
|
@ -71,6 +71,7 @@ type
|
|||
Comparison,
|
||||
Term,
|
||||
Factor,
|
||||
Exponentiation,
|
||||
Unary,
|
||||
Call,
|
||||
Primary
|
||||
|
@ -1092,7 +1093,7 @@ var rules: array[TokenType, ParseRule] = [
|
|||
makeRule(nil, binary, Precedence.Comparison), # GE
|
||||
makeRule(nil, binary, Precedence.Comparison), # LE
|
||||
makeRule(nil, binary, Precedence.Factor), # MOD
|
||||
makeRule(nil, binary, Precedence.Factor), # POW
|
||||
makeRule(nil, binary, Precedence.Exponentiation), # POW
|
||||
makeRule(nil, binary, Precedence.Comparison), # GT
|
||||
makeRule(grouping, call, Precedence.Call), # LP
|
||||
makeRule(nil, nil, Precedence.None), # RP
|
||||
|
|
Loading…
Reference in New Issue