2003/12/29 04:04:35
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:43:40 +0000 (07:43 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:43:40 +0000 (07:43 +0000)
darcs-hash:20040130074340-2ba56-9ea8f4ab053ccaa00a989b666a1cb26127084364.gz

src/org/xwt/js/Interpreter.java
src/org/xwt/js/Lexer.java

index 6d3cdb5..a471412 100644 (file)
@@ -83,7 +83,7 @@ class Interpreter implements ByteCodes, Tokens {
             case DUP: stack.push(stack.peek()); break;
             case NEWSCOPE: scope = new JSScope(scope); break;
             case OLDSCOPE: scope = scope.getParentScope(); break;
-            case ASSERT: if (!JS.toBoolean(stack.pop())) throw je("assertion failed"); break;
+            case ASSERT: if (!JS.toBoolean(stack.pop())) throw je("xwt.assertion.failed" /*FEATURE: line number*/); break;
             case BITNOT: stack.push(JS.N(~JS.toLong(stack.pop()))); break;
             case BANG: stack.push(JS.B(!JS.toBoolean(stack.pop()))); break;
             case NEWFUNCTION: stack.push(((JSFunction)arg).cloneWithNewParentScope(scope)); break;
index e0ecde9..6e541c1 100644 (file)
@@ -80,6 +80,8 @@ class Lexer implements Tokens {
     private int getKeyword(String name) throws IOException {
         //#switch(name)
         case "if": return IF;
+        case "lt": return LT;
+        case "gt": return GT;
         case "in": return IN;
         case "do": return DO;
         case "and": return AND;