Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/scanner.dart

Issue 14050010: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3
4 library engine.scanner; 4 library engine.scanner;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'java_core.dart'; 7 import 'java_core.dart';
8 import 'java_engine.dart'; 8 import 'java_engine.dart';
9 import 'source.dart'; 9 import 'source.dart';
10 import 'error.dart'; 10 import 'error.dart';
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 result[keyword._syntax] = keyword; 252 result[keyword._syntax] = keyword;
253 } 253 }
254 return result; 254 return result;
255 } 255 }
256 /** 256 /**
257 * Initialize a newly created keyword to have the given syntax. The keyword is not a 257 * Initialize a newly created keyword to have the given syntax. The keyword is not a
258 * pseudo-keyword. 258 * pseudo-keyword.
259 * @param syntax the lexeme for the keyword 259 * @param syntax the lexeme for the keyword
260 */ 260 */
261 Keyword.con1(String ___name, int ___ordinal, String syntax) { 261 Keyword.con1(String ___name, int ___ordinal, String syntax) {
262 _jtd_constructor_308_impl(___name, ___ordinal, syntax); 262 _jtd_constructor_309_impl(___name, ___ordinal, syntax);
263 } 263 }
264 _jtd_constructor_308_impl(String ___name, int ___ordinal, String syntax) { 264 _jtd_constructor_309_impl(String ___name, int ___ordinal, String syntax) {
265 _jtd_constructor_309_impl(___name, ___ordinal, syntax, false); 265 _jtd_constructor_310_impl(___name, ___ordinal, syntax, false);
266 } 266 }
267 /** 267 /**
268 * Initialize a newly created keyword to have the given syntax. The keyword is a pseudo-keyword if 268 * Initialize a newly created keyword to have the given syntax. The keyword is a pseudo-keyword if
269 * the given flag is {@code true}. 269 * the given flag is {@code true}.
270 * @param syntax the lexeme for the keyword 270 * @param syntax the lexeme for the keyword
271 * @param isPseudoKeyword {@code true} if this keyword is a pseudo-keyword 271 * @param isPseudoKeyword {@code true} if this keyword is a pseudo-keyword
272 */ 272 */
273 Keyword.con2(String ___name, int ___ordinal, String syntax2, bool isPseudoKeyw ord) { 273 Keyword.con2(String ___name, int ___ordinal, String syntax2, bool isPseudoKeyw ord) {
274 _jtd_constructor_309_impl(___name, ___ordinal, syntax2, isPseudoKeyword); 274 _jtd_constructor_310_impl(___name, ___ordinal, syntax2, isPseudoKeyword);
275 } 275 }
276 _jtd_constructor_309_impl(String ___name, int ___ordinal, String syntax2, bool isPseudoKeyword) { 276 _jtd_constructor_310_impl(String ___name, int ___ordinal, String syntax2, bool isPseudoKeyword) {
277 __name = ___name; 277 __name = ___name;
278 __ordinal = ___ordinal; 278 __ordinal = ___ordinal;
279 this._syntax = syntax2; 279 this._syntax = syntax2;
280 this._isPseudoKeyword2 = isPseudoKeyword; 280 this._isPseudoKeyword2 = isPseudoKeyword;
281 } 281 }
282 /** 282 /**
283 * Return the lexeme for the keyword. 283 * Return the lexeme for the keyword.
284 * @return the lexeme for the keyword 284 * @return the lexeme for the keyword
285 */ 285 */
286 String get syntax => _syntax; 286 String get syntax => _syntax;
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 * Return the source being scanned. 698 * Return the source being scanned.
699 * @return the source being scanned 699 * @return the source being scanned
700 */ 700 */
701 Source get source => _source; 701 Source get source => _source;
702 /** 702 /**
703 * Report an error at the current offset. 703 * Report an error at the current offset.
704 * @param errorCode the error code indicating the nature of the error 704 * @param errorCode the error code indicating the nature of the error
705 * @param arguments any arguments needed to complete the error message 705 * @param arguments any arguments needed to complete the error message
706 */ 706 */
707 void reportError(ScannerErrorCode errorCode, List<Object> arguments) { 707 void reportError(ScannerErrorCode errorCode, List<Object> arguments) {
708 _errorListener.onError(new AnalysisError.con2(source, offset, 1, errorCode, [arguments])); 708 _errorListener.onError(new AnalysisError.con2(source, offset, 1, errorCode, arguments));
709 } 709 }
710 int select(int choice, TokenType yesType, TokenType noType) { 710 int select(int choice, TokenType yesType, TokenType noType) {
711 int next = advance(); 711 int next = advance();
712 if (next == choice) { 712 if (next == choice) {
713 appendToken(yesType); 713 appendToken(yesType);
714 return advance(); 714 return advance();
715 } else { 715 } else {
716 appendToken(noType); 716 appendToken(noType);
717 return next; 717 return next;
718 } 718 }
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 /** 1561 /**
1562 * Return the keyword being represented by this token. 1562 * Return the keyword being represented by this token.
1563 * @return the keyword being represented by this token 1563 * @return the keyword being represented by this token
1564 */ 1564 */
1565 Keyword get keyword => _keyword; 1565 Keyword get keyword => _keyword;
1566 String get lexeme => _keyword.syntax; 1566 String get lexeme => _keyword.syntax;
1567 Keyword value() => _keyword; 1567 Keyword value() => _keyword;
1568 } 1568 }
1569 /** 1569 /**
1570 * Instances of the class {@code BeginToken} represent the opening half of a gro uping pair of 1570 * Instances of the class {@code BeginToken} represent the opening half of a gro uping pair of
1571 * tokens. This is used for curly brackets ('{'), parentheses ('('), and square brackets ('['). 1571 * tokens. This is used for curly brackets ('{'), parentheses ('('), and square brackets ('[[').
1572 * @coverage dart.engine.parser 1572 * @coverage dart.engine.parser
1573 */ 1573 */
1574 class BeginToken extends Token { 1574 class BeginToken extends Token {
1575 /** 1575 /**
1576 * The token that corresponds to this token. 1576 * The token that corresponds to this token.
1577 */ 1577 */
1578 Token _endToken; 1578 Token _endToken;
1579 /** 1579 /**
1580 * Initialize a newly created token representing the opening half of a groupin g pair of tokens. 1580 * Initialize a newly created token representing the opening half of a groupin g pair of tokens.
1581 * @param type the type of the token 1581 * @param type the type of the token
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 static final List<TokenClass> values = [NO_CLASS, ADDITIVE_OPERATOR, ASSIGNMEN T_OPERATOR, BITWISE_AND_OPERATOR, BITWISE_OR_OPERATOR, BITWISE_XOR_OPERATOR, CAS CADE_OPERATOR, CONDITIONAL_OPERATOR, EQUALITY_OPERATOR, LOGICAL_AND_OPERATOR, LO GICAL_OR_OPERATOR, MULTIPLICATIVE_OPERATOR, RELATIONAL_OPERATOR, SHIFT_OPERATOR, UNARY_POSTFIX_OPERATOR, UNARY_PREFIX_OPERATOR]; 1669 static final List<TokenClass> values = [NO_CLASS, ADDITIVE_OPERATOR, ASSIGNMEN T_OPERATOR, BITWISE_AND_OPERATOR, BITWISE_OR_OPERATOR, BITWISE_XOR_OPERATOR, CAS CADE_OPERATOR, CONDITIONAL_OPERATOR, EQUALITY_OPERATOR, LOGICAL_AND_OPERATOR, LO GICAL_OR_OPERATOR, MULTIPLICATIVE_OPERATOR, RELATIONAL_OPERATOR, SHIFT_OPERATOR, UNARY_POSTFIX_OPERATOR, UNARY_PREFIX_OPERATOR];
1670 String __name; 1670 String __name;
1671 int __ordinal = 0; 1671 int __ordinal = 0;
1672 int get ordinal => __ordinal; 1672 int get ordinal => __ordinal;
1673 /** 1673 /**
1674 * The precedence of tokens of this class, or {@code 0} if the such tokens do not represent an 1674 * The precedence of tokens of this class, or {@code 0} if the such tokens do not represent an
1675 * operator. 1675 * operator.
1676 */ 1676 */
1677 int _precedence = 0; 1677 int _precedence = 0;
1678 TokenClass.con1(String ___name, int ___ordinal) { 1678 TokenClass.con1(String ___name, int ___ordinal) {
1679 _jtd_constructor_318_impl(___name, ___ordinal); 1679 _jtd_constructor_319_impl(___name, ___ordinal);
1680 } 1680 }
1681 _jtd_constructor_318_impl(String ___name, int ___ordinal) { 1681 _jtd_constructor_319_impl(String ___name, int ___ordinal) {
1682 _jtd_constructor_319_impl(___name, ___ordinal, 0); 1682 _jtd_constructor_320_impl(___name, ___ordinal, 0);
1683 } 1683 }
1684 TokenClass.con2(String ___name, int ___ordinal, int precedence2) { 1684 TokenClass.con2(String ___name, int ___ordinal, int precedence2) {
1685 _jtd_constructor_319_impl(___name, ___ordinal, precedence2); 1685 _jtd_constructor_320_impl(___name, ___ordinal, precedence2);
1686 } 1686 }
1687 _jtd_constructor_319_impl(String ___name, int ___ordinal, int precedence2) { 1687 _jtd_constructor_320_impl(String ___name, int ___ordinal, int precedence2) {
1688 __name = ___name; 1688 __name = ___name;
1689 __ordinal = ___ordinal; 1689 __ordinal = ___ordinal;
1690 this._precedence = precedence2; 1690 this._precedence = precedence2;
1691 } 1691 }
1692 /** 1692 /**
1693 * Return the precedence of tokens of this class, or {@code 0} if the such tok ens do not represent 1693 * Return the precedence of tokens of this class, or {@code 0} if the such tok ens do not represent
1694 * an operator. 1694 * an operator.
1695 * @return the precedence of tokens of this class 1695 * @return the precedence of tokens of this class
1696 */ 1696 */
1697 int get precedence => _precedence; 1697 int get precedence => _precedence;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 /** 1804 /**
1805 * The class of the token. 1805 * The class of the token.
1806 */ 1806 */
1807 TokenClass _tokenClass; 1807 TokenClass _tokenClass;
1808 /** 1808 /**
1809 * The lexeme that defines this type of token, or {@code null} if there is mor e than one possible 1809 * The lexeme that defines this type of token, or {@code null} if there is mor e than one possible
1810 * lexeme for this type of token. 1810 * lexeme for this type of token.
1811 */ 1811 */
1812 String _lexeme; 1812 String _lexeme;
1813 TokenType.con1(String ___name, int ___ordinal) { 1813 TokenType.con1(String ___name, int ___ordinal) {
1814 _jtd_constructor_320_impl(___name, ___ordinal); 1814 _jtd_constructor_321_impl(___name, ___ordinal);
1815 } 1815 }
1816 _jtd_constructor_320_impl(String ___name, int ___ordinal) { 1816 _jtd_constructor_321_impl(String ___name, int ___ordinal) {
1817 _jtd_constructor_321_impl(___name, ___ordinal, TokenClass.NO_CLASS, null); 1817 _jtd_constructor_322_impl(___name, ___ordinal, TokenClass.NO_CLASS, null);
1818 } 1818 }
1819 TokenType.con2(String ___name, int ___ordinal, TokenClass tokenClass2, String lexeme2) { 1819 TokenType.con2(String ___name, int ___ordinal, TokenClass tokenClass2, String lexeme2) {
1820 _jtd_constructor_321_impl(___name, ___ordinal, tokenClass2, lexeme2); 1820 _jtd_constructor_322_impl(___name, ___ordinal, tokenClass2, lexeme2);
1821 } 1821 }
1822 _jtd_constructor_321_impl(String ___name, int ___ordinal, TokenClass tokenClas s2, String lexeme2) { 1822 _jtd_constructor_322_impl(String ___name, int ___ordinal, TokenClass tokenClas s2, String lexeme2) {
1823 __name = ___name; 1823 __name = ___name;
1824 __ordinal = ___ordinal; 1824 __ordinal = ___ordinal;
1825 this._tokenClass = tokenClass2 == null ? TokenClass.NO_CLASS : tokenClass2; 1825 this._tokenClass = tokenClass2 == null ? TokenClass.NO_CLASS : tokenClass2;
1826 this._lexeme = lexeme2; 1826 this._lexeme = lexeme2;
1827 } 1827 }
1828 /** 1828 /**
1829 * Return the lexeme that defines this type of token, or {@code null} if there is more than one 1829 * Return the lexeme that defines this type of token, or {@code null} if there is more than one
1830 * possible lexeme for this type of token. 1830 * possible lexeme for this type of token.
1831 * @return the lexeme that defines this type of token 1831 * @return the lexeme that defines this type of token
1832 */ 1832 */
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 * @return {@code true} if this token type represents an operator that can be defined by users 1902 * @return {@code true} if this token type represents an operator that can be defined by users
1903 */ 1903 */
1904 bool isUserDefinableOperator() => identical(_lexeme, "==") || identical(_lexem e, "~") || identical(_lexeme, "[]") || identical(_lexeme, "[]=") || identical(_l exeme, "*") || identical(_lexeme, "/") || identical(_lexeme, "%") || identical(_ lexeme, "~/") || identical(_lexeme, "+") || identical(_lexeme, "-") || identical (_lexeme, "<<") || identical(_lexeme, ">>") || identical(_lexeme, ">=") || ident ical(_lexeme, ">") || identical(_lexeme, "<=") || identical(_lexeme, "<") || ide ntical(_lexeme, "&") || identical(_lexeme, "^") || identical(_lexeme, "|"); 1904 bool isUserDefinableOperator() => identical(_lexeme, "==") || identical(_lexem e, "~") || identical(_lexeme, "[]") || identical(_lexeme, "[]=") || identical(_l exeme, "*") || identical(_lexeme, "/") || identical(_lexeme, "%") || identical(_ lexeme, "~/") || identical(_lexeme, "+") || identical(_lexeme, "-") || identical (_lexeme, "<<") || identical(_lexeme, ">>") || identical(_lexeme, ">=") || ident ical(_lexeme, ">") || identical(_lexeme, "<=") || identical(_lexeme, "<") || ide ntical(_lexeme, "&") || identical(_lexeme, "^") || identical(_lexeme, "|");
1905 int compareTo(TokenType other) => __ordinal - other.__ordinal; 1905 int compareTo(TokenType other) => __ordinal - other.__ordinal;
1906 String toString() => __name; 1906 String toString() => __name;
1907 } 1907 }
1908 class TokenType_EOF extends TokenType { 1908 class TokenType_EOF extends TokenType {
1909 TokenType_EOF(String ___name, int ___ordinal, TokenClass arg0, String arg1) : super.con2(___name, ___ordinal, arg0, arg1); 1909 TokenType_EOF(String ___name, int ___ordinal, TokenClass arg0, String arg1) : super.con2(___name, ___ordinal, arg0, arg1);
1910 String toString() => "-eof-"; 1910 String toString() => "-eof-";
1911 } 1911 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698