source.append((char) ts.FUNCTION);\r
\r
if (ts.matchToken(ts.NAME)) {\r
- name = ts.getString();\r
- source.addString(ts.NAME, name);\r
+ // HACK: XWT does not support named functions
+ throw new IOException(
+ "named functions are not supported, use anonymos "+
+ "declaration (myfun = function() {...}"
+ );
}\r
else\r
; // it's an anonymous function\r
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