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

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

Issue 23461019: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 library engine.parser; 3 library engine.parser;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'java_core.dart'; 5 import 'java_core.dart';
6 import 'instrumentation.dart'; 6 import 'instrumentation.dart';
7 import 'error.dart'; 7 import 'error.dart';
8 import 'source.dart'; 8 import 'source.dart';
9 import 'scanner.dart'; 9 import 'scanner.dart';
10 import 'ast.dart'; 10 import 'ast.dart';
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 * 536 *
537 * @return the synthetic string literal that was created 537 * @return the synthetic string literal that was created
538 */ 538 */
539 SimpleStringLiteral createSyntheticStringLiteral() => new SimpleStringLiteral. full(createSyntheticToken2(TokenType.STRING), ""); 539 SimpleStringLiteral createSyntheticStringLiteral() => new SimpleStringLiteral. full(createSyntheticToken2(TokenType.STRING), "");
540 540
541 /** 541 /**
542 * Create a synthetic token representing the given keyword. 542 * Create a synthetic token representing the given keyword.
543 * 543 *
544 * @return the synthetic token that was created 544 * @return the synthetic token that was created
545 */ 545 */
546 Token createSyntheticToken(Keyword keyword) => new KeywordToken_12(keyword, _c urrentToken.offset); 546 Token createSyntheticToken(Keyword keyword) => new KeywordToken_14(keyword, _c urrentToken.offset);
547 547
548 /** 548 /**
549 * Create a synthetic token with the given type. 549 * Create a synthetic token with the given type.
550 * 550 *
551 * @return the synthetic token that was created 551 * @return the synthetic token that was created
552 */ 552 */
553 Token createSyntheticToken2(TokenType type) => new StringToken(type, "", _curr entToken.offset); 553 Token createSyntheticToken2(TokenType type) => new StringToken(type, "", _curr entToken.offset);
554 554
555 /** 555 /**
556 * Check that the given expression is assignable and report an error if it isn 't. 556 * Check that the given expression is assignable and report an error if it isn 't.
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 * comment 1823 * comment
1824 * @param sourceOffset the offset of the first character of the reference sour ce 1824 * @param sourceOffset the offset of the first character of the reference sour ce
1825 * @return the comment reference that was parsed, or `null` if no reference co uld be found 1825 * @return the comment reference that was parsed, or `null` if no reference co uld be found
1826 */ 1826 */
1827 CommentReference parseCommentReference(String referenceSource, int sourceOffse t) { 1827 CommentReference parseCommentReference(String referenceSource, int sourceOffse t) {
1828 if (referenceSource.length == 0) { 1828 if (referenceSource.length == 0) {
1829 return null; 1829 return null;
1830 } 1830 }
1831 try { 1831 try {
1832 List<bool> errorFound = [false]; 1832 List<bool> errorFound = [false];
1833 AnalysisErrorListener listener = new AnalysisErrorListener_13(errorFound); 1833 AnalysisErrorListener listener = new AnalysisErrorListener_15(errorFound);
1834 StringScanner scanner = new StringScanner(null, referenceSource, listener) ; 1834 StringScanner scanner = new StringScanner(null, referenceSource, listener) ;
1835 scanner.setSourceStart(1, 1, sourceOffset); 1835 scanner.setSourceStart(1, 1, sourceOffset);
1836 Token firstToken = scanner.tokenize(); 1836 Token firstToken = scanner.tokenize();
1837 if (errorFound[0]) { 1837 if (errorFound[0]) {
1838 return null; 1838 return null;
1839 } 1839 }
1840 Token newKeyword = null; 1840 Token newKeyword = null;
1841 if (matches3(firstToken, Keyword.NEW)) { 1841 if (matches3(firstToken, Keyword.NEW)) {
1842 newKeyword = firstToken; 1842 newKeyword = firstToken;
1843 firstToken = firstToken.next; 1843 firstToken = firstToken.next;
(...skipping 3875 matching lines...) Expand 10 before | Expand all | Expand 10 after
5719 reportError9(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword, []); 5719 reportError9(ParserErrorCode.EXTERNAL_TYPEDEF, modifiers.externalKeyword, []);
5720 } 5720 }
5721 if (modifiers.finalKeyword != null) { 5721 if (modifiers.finalKeyword != null) {
5722 reportError9(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []); 5722 reportError9(ParserErrorCode.FINAL_TYPEDEF, modifiers.finalKeyword, []);
5723 } 5723 }
5724 if (modifiers.varKeyword != null) { 5724 if (modifiers.varKeyword != null) {
5725 reportError9(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []); 5725 reportError9(ParserErrorCode.VAR_TYPEDEF, modifiers.varKeyword, []);
5726 } 5726 }
5727 } 5727 }
5728 } 5728 }
5729 class KeywordToken_12 extends KeywordToken { 5729 class KeywordToken_14 extends KeywordToken {
5730 KeywordToken_12(Keyword arg0, int arg1) : super(arg0, arg1); 5730 KeywordToken_14(Keyword arg0, int arg1) : super(arg0, arg1);
5731 int get length => 0; 5731 int get length => 0;
5732 } 5732 }
5733 class AnalysisErrorListener_13 implements AnalysisErrorListener { 5733 class AnalysisErrorListener_15 implements AnalysisErrorListener {
5734 List<bool> errorFound; 5734 List<bool> errorFound;
5735 AnalysisErrorListener_13(this.errorFound); 5735 AnalysisErrorListener_15(this.errorFound);
5736 void onError(AnalysisError error) { 5736 void onError(AnalysisError error) {
5737 errorFound[0] = true; 5737 errorFound[0] = true;
5738 } 5738 }
5739 } 5739 }
5740 /** 5740 /**
5741 * The enumeration `ParserErrorCode` defines the error codes used for errors det ected by the 5741 * The enumeration `ParserErrorCode` defines the error codes used for errors det ected by the
5742 * parser. The convention for this class is for the name of the error code to in dicate the problem 5742 * parser. The convention for this class is for the name of the error code to in dicate the problem
5743 * that caused the error to be generated and for the error message to explain wh at is wrong and, 5743 * that caused the error to be generated and for the error message to explain wh at is wrong and,
5744 * when appropriate, how the problem can be corrected. 5744 * when appropriate, how the problem can be corrected.
5745 * 5745 *
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after
6991 if ("\n" == separator) { 6991 if ("\n" == separator) {
6992 _writer.print("\n"); 6992 _writer.print("\n");
6993 indent(); 6993 indent();
6994 } else if (i > 0) { 6994 } else if (i > 0) {
6995 _writer.print(separator); 6995 _writer.print(separator);
6996 } 6996 }
6997 _writer.print(tokens[i].lexeme); 6997 _writer.print(tokens[i].lexeme);
6998 } 6998 }
6999 } 6999 }
7000 } 7000 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698