2003/04/30 04:08:37
[org.ibex.core.git] / src / org / mozilla / javascript / TokenStream.java
index 25b5fc3..c1a47cd 100644 (file)
@@ -784,6 +784,14 @@ public class TokenStream {
         if (c == EOF_CHAR)\r
             return EOF;\r
 \r
+        // HACK: XWT "and" as "&&" support
+        if (c == 'a' || c == 'A') {
+            if (in.match('n') || in.match('N')) {
+                if (in.match('d') || in.match('D')) return AND;
+                in.unread();
+            }
+        }
+
         // identifier/keyword/instanceof?\r
         // watch out for starting with a <backslash>\r
         boolean isUnicodeEscapeStart = false;\r