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

Side by Side Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 135803003: Translate index. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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.parser_test; 4 library engine.parser_test;
5 5
6 import 'package:analyzer/src/generated/java_core.dart'; 6 import 'package:analyzer/src/generated/java_core.dart';
7 import 'package:analyzer/src/generated/java_junit.dart'; 7 import 'package:analyzer/src/generated/java_junit.dart';
8 import 'package:analyzer/src/generated/error.dart'; 8 import 'package:analyzer/src/generated/error.dart';
9 import 'package:analyzer/src/generated/source.dart' show Source; 9 import 'package:analyzer/src/generated/source.dart' show Source;
10 import 'package:analyzer/src/generated/scanner.dart'; 10 import 'package:analyzer/src/generated/scanner.dart';
(...skipping 4408 matching lines...) Expand 10 before | Expand all | Expand 10 after
4419 /** 4419 /**
4420 * Invoke the method [Parser#computeStringValue] with the given argument. 4420 * Invoke the method [Parser#computeStringValue] with the given argument.
4421 * 4421 *
4422 * @param lexeme the argument to the method 4422 * @param lexeme the argument to the method
4423 * @param first `true` if this is the first token in a string literal 4423 * @param first `true` if this is the first token in a string literal
4424 * @param last `true` if this is the last token in a string literal 4424 * @param last `true` if this is the last token in a string literal
4425 * @return the result of invoking the method 4425 * @return the result of invoking the method
4426 * @throws Exception if the method could not be invoked or throws an exception 4426 * @throws Exception if the method could not be invoked or throws an exception
4427 */ 4427 */
4428 String computeStringValue(String lexeme, bool first, bool last) { 4428 String computeStringValue(String lexeme, bool first, bool last) {
4429 AnalysisErrorListener listener = new AnalysisErrorListener_32(); 4429 AnalysisErrorListener listener = new AnalysisErrorListener_35();
4430 Parser parser = new Parser(null, listener); 4430 Parser parser = new Parser(null, listener);
4431 return invokeParserMethodImpl(parser, "computeStringValue", <Object> [lexeme , first, last], null) as String; 4431 return invokeParserMethodImpl(parser, "computeStringValue", <Object> [lexeme , first, last], null) as String;
4432 } 4432 }
4433 4433
4434 /** 4434 /**
4435 * Invoke the method [Parser#createSyntheticIdentifier] with the parser set to the token 4435 * Invoke the method [Parser#createSyntheticIdentifier] with the parser set to the token
4436 * stream produced by scanning the given source. 4436 * stream produced by scanning the given source.
4437 * 4437 *
4438 * @param source the source to be scanned to produce the token stream being te sted 4438 * @param source the source to be scanned to produce the token stream being te sted
4439 * @return the result of invoking the method 4439 * @return the result of invoking the method
(...skipping 2261 matching lines...) Expand 10 before | Expand all | Expand 10 after
6701 runJUnitTest(__test, __test.test_skipTypeName_parameterized); 6701 runJUnitTest(__test, __test.test_skipTypeName_parameterized);
6702 }); 6702 });
6703 _ut.test('test_skipTypeName_simple', () { 6703 _ut.test('test_skipTypeName_simple', () {
6704 final __test = new SimpleParserTest(); 6704 final __test = new SimpleParserTest();
6705 runJUnitTest(__test, __test.test_skipTypeName_simple); 6705 runJUnitTest(__test, __test.test_skipTypeName_simple);
6706 }); 6706 });
6707 }); 6707 });
6708 } 6708 }
6709 } 6709 }
6710 6710
6711 class AnalysisErrorListener_32 implements AnalysisErrorListener { 6711 class AnalysisErrorListener_35 implements AnalysisErrorListener {
6712 void onError(AnalysisError event) { 6712 void onError(AnalysisError event) {
6713 JUnitTestCase.fail("Unexpected compilation error: ${event.message} (${event. offset}, ${event.length})"); 6713 JUnitTestCase.fail("Unexpected compilation error: ${event.message} (${event. offset}, ${event.length})");
6714 } 6714 }
6715 } 6715 }
6716 6716
6717 class NonErrorParserTest extends ParserTestCase { 6717 class NonErrorParserTest extends ParserTestCase {
6718 void test_constFactory_external() { 6718 void test_constFactory_external() {
6719 ParserTestCase.parse("parseClassMember", <Object> ["C"], "external const fac tory C();"); 6719 ParserTestCase.parse("parseClassMember", <Object> ["C"], "external const fac tory C();");
6720 } 6720 }
6721 6721
(...skipping 4773 matching lines...) Expand 10 before | Expand all | Expand 10 after
11495 'parseStatements_1': new MethodTrampoline(1, (Parser target, arg0) => target.p arseStatements(arg0)), 11495 'parseStatements_1': new MethodTrampoline(1, (Parser target, arg0) => target.p arseStatements(arg0)),
11496 'parseAnnotation_0': new MethodTrampoline(0, (Parser target) => target.parseAn notation()), 11496 'parseAnnotation_0': new MethodTrampoline(0, (Parser target) => target.parseAn notation()),
11497 'parseArgument_0': new MethodTrampoline(0, (Parser target) => target.parseArgu ment()), 11497 'parseArgument_0': new MethodTrampoline(0, (Parser target) => target.parseArgu ment()),
11498 'parseArgumentList_0': new MethodTrampoline(0, (Parser target) => target.parse ArgumentList()), 11498 'parseArgumentList_0': new MethodTrampoline(0, (Parser target) => target.parse ArgumentList()),
11499 'parseBitwiseOrExpression_0': new MethodTrampoline(0, (Parser target) => targe t.parseBitwiseOrExpression()), 11499 'parseBitwiseOrExpression_0': new MethodTrampoline(0, (Parser target) => targe t.parseBitwiseOrExpression()),
11500 'parseBlock_0': new MethodTrampoline(0, (Parser target) => target.parseBlock() ), 11500 'parseBlock_0': new MethodTrampoline(0, (Parser target) => target.parseBlock() ),
11501 'parseClassMember_1': new MethodTrampoline(1, (Parser target, arg0) => target. parseClassMember(arg0)), 11501 'parseClassMember_1': new MethodTrampoline(1, (Parser target, arg0) => target. parseClassMember(arg0)),
11502 'parseCompilationUnit_0': new MethodTrampoline(0, (Parser target) => target.pa rseCompilationUnit2()), 11502 'parseCompilationUnit_0': new MethodTrampoline(0, (Parser target) => target.pa rseCompilationUnit2()),
11503 'parseConditionalExpression_0': new MethodTrampoline(0, (Parser target) => tar get.parseConditionalExpression()), 11503 'parseConditionalExpression_0': new MethodTrampoline(0, (Parser target) => tar get.parseConditionalExpression()),
11504 'parseConstructorName_0': new MethodTrampoline(0, (Parser target) => target.pa rseConstructorName()), 11504 'parseConstructorName_0': new MethodTrampoline(0, (Parser target) => target.pa rseConstructorName()),
11505 'parseExpression_0': new MethodTrampoline(0, (Parser target) => target.parseEx pression2()), 11505 'parseExpression_0': new MethodTrampoline(0, (Parser target) => target.parseEx pression3()),
11506 'parseExpressionWithoutCascade_0': new MethodTrampoline(0, (Parser target) => target.parseExpressionWithoutCascade()), 11506 'parseExpressionWithoutCascade_0': new MethodTrampoline(0, (Parser target) => target.parseExpressionWithoutCascade()),
11507 'parseExtendsClause_0': new MethodTrampoline(0, (Parser target) => target.pars eExtendsClause()), 11507 'parseExtendsClause_0': new MethodTrampoline(0, (Parser target) => target.pars eExtendsClause()),
11508 'parseFormalParameterList_0': new MethodTrampoline(0, (Parser target) => targe t.parseFormalParameterList()), 11508 'parseFormalParameterList_0': new MethodTrampoline(0, (Parser target) => targe t.parseFormalParameterList()),
11509 'parseFunctionExpression_0': new MethodTrampoline(0, (Parser target) => target .parseFunctionExpression()), 11509 'parseFunctionExpression_0': new MethodTrampoline(0, (Parser target) => target .parseFunctionExpression()),
11510 'parseImplementsClause_0': new MethodTrampoline(0, (Parser target) => target.p arseImplementsClause()), 11510 'parseImplementsClause_0': new MethodTrampoline(0, (Parser target) => target.p arseImplementsClause()),
11511 'parseLabel_0': new MethodTrampoline(0, (Parser target) => target.parseLabel() ), 11511 'parseLabel_0': new MethodTrampoline(0, (Parser target) => target.parseLabel() ),
11512 'parseLibraryIdentifier_0': new MethodTrampoline(0, (Parser target) => target. parseLibraryIdentifier()), 11512 'parseLibraryIdentifier_0': new MethodTrampoline(0, (Parser target) => target. parseLibraryIdentifier()),
11513 'parseLogicalOrExpression_0': new MethodTrampoline(0, (Parser target) => targe t.parseLogicalOrExpression()), 11513 'parseLogicalOrExpression_0': new MethodTrampoline(0, (Parser target) => targe t.parseLogicalOrExpression()),
11514 'parseMapLiteralEntry_0': new MethodTrampoline(0, (Parser target) => target.pa rseMapLiteralEntry()), 11514 'parseMapLiteralEntry_0': new MethodTrampoline(0, (Parser target) => target.pa rseMapLiteralEntry()),
11515 'parseNormalFormalParameter_0': new MethodTrampoline(0, (Parser target) => tar get.parseNormalFormalParameter()), 11515 'parseNormalFormalParameter_0': new MethodTrampoline(0, (Parser target) => tar get.parseNormalFormalParameter()),
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
11666 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelFunction(arg0)), 11666 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelFunction(arg0)),
11667 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelVariable(arg0)), 11667 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ et, arg0) => target.validateModifiersForTopLevelVariable(arg0)),
11668 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0) => target.validateModifiersForTypedef(arg0)),}; 11668 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0) => target.validateModifiersForTypedef(arg0)),};
11669 11669
11670 11670
11671 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj ects, Token tokenStream) { 11671 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj ects, Token tokenStream) {
11672 parser.currentToken = tokenStream; 11672 parser.currentToken = tokenStream;
11673 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length} ']; 11673 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length} '];
11674 return method.invoke(parser, objects); 11674 return method.invoke(parser, objects);
11675 } 11675 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698