X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fjs%2FLexer.java;h=0bf311f6b0d6088cd76c17195d42ea6d7f0a5f62;hb=de378041d5ca2aca1a2b5a31ef15ae90a86c977f;hp=b8ce34316657c110f89169a5111ec2b62e0fdfb6;hpb=434205ebc29c9da561a6c1cd4f869cc6d2b9bec4;p=org.ibex.core.git diff --git a/src/org/xwt/js/Lexer.java b/src/org/xwt/js/Lexer.java index b8ce343..0bf311f 100644 --- a/src/org/xwt/js/Lexer.java +++ b/src/org/xwt/js/Lexer.java @@ -85,6 +85,7 @@ class Lexer implements Tokens { case "in": return IN; case "do": return DO; case "and": return AND; + case "or": return OR; case "for": return FOR; case "int": return RESERVED; case "new": return RESERVED; @@ -274,8 +275,8 @@ class Lexer implements Tokens { case '!': return !in.match('=') ? BANG : in.match('=') ? SHNE : NE; case '%': return in.match('=') ? ASSIGN_MOD : MOD; case '~': return BITNOT; - case '+': return in.match('=') ? ASSIGN_ADD : in.match('+') ? INC : ADD; - case '-': return in.match('=') ? ASSIGN_SUB: in.match('-') ? DEC : SUB; + case '+': return in.match('=') ? ASSIGN_ADD : in.match('+') ? (in.match('=') ? ADD_TRAP : INC) : ADD; + case '-': return in.match('=') ? ASSIGN_SUB: in.match('-') ? (in.match('=') ? DEL_TRAP : DEC) : SUB; case '*': return in.match('=') ? ASSIGN_MUL : MUL; case '<': return !in.match('<') ? (in.match('=') ? LE : LT) : in.match('=') ? ASSIGN_LSH : LSH; case '>': return !in.match('>') ? (in.match('=') ? GE : GT) :