|
@@ -1441,12 +1441,12 @@ Type TParser
|
|
|
Return ParsePrimaryExpr( False )
|
|
|
End Method
|
|
|
|
|
|
- Method ParseMulDivExpr:TExpr()
|
|
|
+ Method ParsePowExpr:TExpr()
|
|
|
Local expr:TExpr=ParseUnaryExpr()
|
|
|
Repeat
|
|
|
Local op$=_toke
|
|
|
Select op
|
|
|
- Case "^","*","/","mod","shl","shr", "sar"
|
|
|
+ Case "^"
|
|
|
NextToke
|
|
|
Local rhs:TExpr=ParseUnaryExpr()
|
|
|
expr=New TBinaryMathExpr.Create( op,expr,rhs )
|
|
@@ -1456,6 +1456,21 @@ Type TParser
|
|
|
Forever
|
|
|
End Method
|
|
|
|
|
|
+ Method ParseMulDivExpr:TExpr()
|
|
|
+ Local expr:TExpr=ParsePowExpr()
|
|
|
+ Repeat
|
|
|
+ Local op$=_toke
|
|
|
+ Select op
|
|
|
+ Case "*","/","mod","shl","shr", "sar"
|
|
|
+ NextToke
|
|
|
+ Local rhs:TExpr=ParsePowExpr()
|
|
|
+ expr=New TBinaryMathExpr.Create( op,expr,rhs )
|
|
|
+ Default
|
|
|
+ Return expr
|
|
|
+ End Select
|
|
|
+ Forever
|
|
|
+ End Method
|
|
|
+
|
|
|
Method ParseAddSubExpr:TExpr()
|
|
|
Local expr:TExpr=ParseMulDivExpr()
|
|
|
Repeat
|