From 4597878b160378792479c6547fa8c355bdd32066 Mon Sep 17 00:00:00 2001 From: Nicolas Cannasse Date: Mon, 8 Sep 2008 19:06:44 +0000 Subject: [PATCH] parser binop fix --- haxelib.xml | 2 +- hscript/Parser.hx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/haxelib.xml b/haxelib.xml index 53c6289..1eab0bb 100644 --- a/haxelib.xml +++ b/haxelib.xml @@ -1,5 +1,5 @@ haXe Script is a scripting engine for a subset of the haXe language - Fixed bug in interpreter when catching exception in function + Fixed bug in interpreter when parsing binops \ No newline at end of file diff --git a/hscript/Parser.hx b/hscript/Parser.hx index eb1ca7b..daffb62 100644 --- a/hscript/Parser.hx +++ b/hscript/Parser.hx @@ -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); } }