parser binop fix

This commit is contained in:
Nicolas Cannasse
2008-09-08 19:06:44 +00:00
parent 75168c7f57
commit 4597878b16
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<project name="hscript" url="http://haxe.org/com/libs/hscript" license="GPL">
<user name="ncannasse"/>
<description>haXe Script is a scripting engine for a subset of the haXe language</description>
<version name="1.4.1">Fixed bug in interpreter when catching exception in function</version>
<version name="1.4.2">Fixed bug in interpreter when parsing binops</version>
</project>
+3 -1
View File
@@ -190,7 +190,9 @@ class Parser {
return switch( e2 ) {
case EBinop(op2,e2,e3):
if( priority(op) > priority(op2) )
return EBinop(op2,makeBinop(op,e1,e2),e3);
EBinop(op2,makeBinop(op,e1,e2),e3);
else
EBinop(op,e1,e2);
default: EBinop(op,e1,e2);
}
}