| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.scanner; | 3 library engine.scanner; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
| 7 import 'source.dart'; | 7 import 'source.dart'; |
| 8 import 'error.dart'; | 8 import 'error.dart'; |
| 9 import 'instrumentation.dart'; | 9 import 'instrumentation.dart'; |
| 10 /** | 10 /** |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 next = advance(); | 913 next = advance(); |
| 914 } | 914 } |
| 915 if (!hasDigit) { | 915 if (!hasDigit) { |
| 916 appendStringToken(TokenType.INT, getString(start, -2)); | 916 appendStringToken(TokenType.INT, getString(start, -2)); |
| 917 if (0x2E == next) { | 917 if (0x2E == next) { |
| 918 return select2(0x2E, TokenType.PERIOD_PERIOD_PERIOD, TokenType.PERIOD_PE
RIOD, offset - 1); | 918 return select2(0x2E, TokenType.PERIOD_PERIOD_PERIOD, TokenType.PERIOD_PE
RIOD, offset - 1); |
| 919 } | 919 } |
| 920 appendToken2(TokenType.PERIOD, offset - 1); | 920 appendToken2(TokenType.PERIOD, offset - 1); |
| 921 return bigSwitch(next); | 921 return bigSwitch(next); |
| 922 } | 922 } |
| 923 if (next == 0x64 || next == 0x44) { | |
| 924 next = advance(); | |
| 925 } | |
| 926 appendStringToken(TokenType.DOUBLE, getString(start, next < 0 ? 0 : -1)); | 923 appendStringToken(TokenType.DOUBLE, getString(start, next < 0 ? 0 : -1)); |
| 927 return next; | 924 return next; |
| 928 } | 925 } |
| 929 int tokenizeGreaterThan(int next) { | 926 int tokenizeGreaterThan(int next) { |
| 930 next = advance(); | 927 next = advance(); |
| 931 if (0x3D == next) { | 928 if (0x3D == next) { |
| 932 appendToken(TokenType.GT_EQ); | 929 appendToken(TokenType.GT_EQ); |
| 933 return advance(); | 930 return advance(); |
| 934 } else if (0x3E == next) { | 931 } else if (0x3E == next) { |
| 935 next = advance(); | 932 next = advance(); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 } | 1163 } |
| 1167 int tokenizeMultiply(int next) => select(0x3D, TokenType.STAR_EQ, TokenType.ST
AR); | 1164 int tokenizeMultiply(int next) => select(0x3D, TokenType.STAR_EQ, TokenType.ST
AR); |
| 1168 int tokenizeNumber(int next) { | 1165 int tokenizeNumber(int next) { |
| 1169 int start = offset; | 1166 int start = offset; |
| 1170 while (true) { | 1167 while (true) { |
| 1171 next = advance(); | 1168 next = advance(); |
| 1172 if (0x30 <= next && next <= 0x39) { | 1169 if (0x30 <= next && next <= 0x39) { |
| 1173 continue; | 1170 continue; |
| 1174 } else if (next == 0x2E) { | 1171 } else if (next == 0x2E) { |
| 1175 return tokenizeFractionPart(advance(), start); | 1172 return tokenizeFractionPart(advance(), start); |
| 1176 } else if (next == 0x64 || next == 0x44) { | |
| 1177 appendStringToken(TokenType.DOUBLE, getString(start, 0)); | |
| 1178 return advance(); | |
| 1179 } else if (next == 0x65 || next == 0x45) { | 1173 } else if (next == 0x65 || next == 0x45) { |
| 1180 return tokenizeFractionPart(next, start); | 1174 return tokenizeFractionPart(next, start); |
| 1181 } else { | 1175 } else { |
| 1182 appendStringToken(TokenType.INT, getString(start, next < 0 ? 0 : -1)); | 1176 appendStringToken(TokenType.INT, getString(start, next < 0 ? 0 : -1)); |
| 1183 return next; | 1177 return next; |
| 1184 } | 1178 } |
| 1185 } | 1179 } |
| 1186 } | 1180 } |
| 1187 int tokenizeOpenSquareBracket(int next) { | 1181 int tokenizeOpenSquareBracket(int next) { |
| 1188 next = advance(); | 1182 next = advance(); |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 * Return `true` if this token type represents an operator that can be defined
by users. | 2100 * Return `true` if this token type represents an operator that can be defined
by users. |
| 2107 * | 2101 * |
| 2108 * @return `true` if this token type represents an operator that can be define
d by users | 2102 * @return `true` if this token type represents an operator that can be define
d by users |
| 2109 */ | 2103 */ |
| 2110 bool get isUserDefinableOperator => identical(lexeme, "==") || identical(lexem
e, "~") || identical(lexeme, "[]") || identical(lexeme, "[]=") || identical(lexe
me, "*") || identical(lexeme, "/") || identical(lexeme, "%") || identical(lexeme
, "~/") || identical(lexeme, "+") || identical(lexeme, "-") || identical(lexeme,
"<<") || identical(lexeme, ">>") || identical(lexeme, ">=") || identical(lexeme
, ">") || identical(lexeme, "<=") || identical(lexeme, "<") || identical(lexeme,
"&") || identical(lexeme, "^") || identical(lexeme, "|"); | 2104 bool get isUserDefinableOperator => identical(lexeme, "==") || identical(lexem
e, "~") || identical(lexeme, "[]") || identical(lexeme, "[]=") || identical(lexe
me, "*") || identical(lexeme, "/") || identical(lexeme, "%") || identical(lexeme
, "~/") || identical(lexeme, "+") || identical(lexeme, "-") || identical(lexeme,
"<<") || identical(lexeme, ">>") || identical(lexeme, ">=") || identical(lexeme
, ">") || identical(lexeme, "<=") || identical(lexeme, "<") || identical(lexeme,
"&") || identical(lexeme, "^") || identical(lexeme, "|"); |
| 2111 } | 2105 } |
| 2112 class TokenType_EOF extends TokenType { | 2106 class TokenType_EOF extends TokenType { |
| 2113 TokenType_EOF(String name, int ordinal, TokenClass arg0, String arg1) : super.
con2(name, ordinal, arg0, arg1); | 2107 TokenType_EOF(String name, int ordinal, TokenClass arg0, String arg1) : super.
con2(name, ordinal, arg0, arg1); |
| 2114 String toString() => "-eof-"; | 2108 String toString() => "-eof-"; |
| 2115 } | 2109 } |
| OLD | NEW |