2004/01/08 05:02:19
[org.ibex.core.git] / src / org / xwt / js / Lexer.java
index 6e541c1..b8ce343 100644 (file)
@@ -265,7 +265,7 @@ class Lexer implements Tokens {
         case ')': return RP;
         case ',': return COMMA;
         case '?': return HOOK;
-        case ':': return COLON;
+        case ':': return !in.match(':') ? COLON : in.match('=') ? GRAMMAR : le(":: is not a valid token");
         case '.': return DOT;
         case '|': return in.match('|') ? OR : (in.match('=') ? ASSIGN_BITOR : BITOR);
         case '^': return in.match('=') ? ASSIGN_BITXOR : BITXOR;
@@ -295,6 +295,7 @@ class Lexer implements Tokens {
         }
     }
 
+    private int le(String s) throws LexerException { if (true) throw new LexerException(s); return 0; }
 
     // SmartReader ////////////////////////////////////////////////////////////////