| 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.parser_test; | 3 library engine.parser_test; |
| 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; | 4 import 'package:analyzer_experimental/src/generated/java_core.dart'; |
| 5 import 'package:analyzer_experimental/src/generated/java_junit.dart'; | 5 import 'package:analyzer_experimental/src/generated/java_junit.dart'; |
| 6 import 'package:analyzer_experimental/src/generated/error.dart'; | 6 import 'package:analyzer_experimental/src/generated/error.dart'; |
| 7 import 'package:analyzer_experimental/src/generated/scanner.dart'; | 7 import 'package:analyzer_experimental/src/generated/scanner.dart'; |
| 8 import 'package:analyzer_experimental/src/generated/ast.dart'; | 8 import 'package:analyzer_experimental/src/generated/ast.dart'; |
| 9 import 'package:analyzer_experimental/src/generated/parser.dart'; | 9 import 'package:analyzer_experimental/src/generated/parser.dart'; |
| 10 import 'package:analyzer_experimental/src/generated/utilities_dart.dart'; | 10 import 'package:analyzer_experimental/src/generated/utilities_dart.dart'; |
| (...skipping 3757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3768 /** | 3768 /** |
| 3769 * Invoke the method [Parser#computeStringValue] with the given argument. | 3769 * Invoke the method [Parser#computeStringValue] with the given argument. |
| 3770 * | 3770 * |
| 3771 * @param lexeme the argument to the method | 3771 * @param lexeme the argument to the method |
| 3772 * @param first `true` if this is the first token in a string literal | 3772 * @param first `true` if this is the first token in a string literal |
| 3773 * @param last `true` if this is the last token in a string literal | 3773 * @param last `true` if this is the last token in a string literal |
| 3774 * @return the result of invoking the method | 3774 * @return the result of invoking the method |
| 3775 * @throws Exception if the method could not be invoked or throws an exception | 3775 * @throws Exception if the method could not be invoked or throws an exception |
| 3776 */ | 3776 */ |
| 3777 String computeStringValue(String lexeme, bool first, bool last) { | 3777 String computeStringValue(String lexeme, bool first, bool last) { |
| 3778 AnalysisErrorListener listener = new AnalysisErrorListener_22(); | 3778 AnalysisErrorListener listener = new AnalysisErrorListener_26(); |
| 3779 Parser parser = new Parser(null, listener); | 3779 Parser parser = new Parser(null, listener); |
| 3780 return invokeParserMethodImpl(parser, "computeStringValue", <Object> [lexeme
, first, last], null) as String; | 3780 return invokeParserMethodImpl(parser, "computeStringValue", <Object> [lexeme
, first, last], null) as String; |
| 3781 } | 3781 } |
| 3782 | 3782 |
| 3783 /** | 3783 /** |
| 3784 * Invoke the method [Parser#createSyntheticIdentifier] with the parser set to
the token | 3784 * Invoke the method [Parser#createSyntheticIdentifier] with the parser set to
the token |
| 3785 * stream produced by scanning the given source. | 3785 * stream produced by scanning the given source. |
| 3786 * | 3786 * |
| 3787 * @param source the source to be scanned to produce the token stream being te
sted | 3787 * @param source the source to be scanned to produce the token stream being te
sted |
| 3788 * @return the result of invoking the method | 3788 * @return the result of invoking the method |
| (...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5996 final __test = new SimpleParserTest(); | 5996 final __test = new SimpleParserTest(); |
| 5997 runJUnitTest(__test, __test.test_skipTypeName_parameterized); | 5997 runJUnitTest(__test, __test.test_skipTypeName_parameterized); |
| 5998 }); | 5998 }); |
| 5999 _ut.test('test_skipTypeName_simple', () { | 5999 _ut.test('test_skipTypeName_simple', () { |
| 6000 final __test = new SimpleParserTest(); | 6000 final __test = new SimpleParserTest(); |
| 6001 runJUnitTest(__test, __test.test_skipTypeName_simple); | 6001 runJUnitTest(__test, __test.test_skipTypeName_simple); |
| 6002 }); | 6002 }); |
| 6003 }); | 6003 }); |
| 6004 } | 6004 } |
| 6005 } | 6005 } |
| 6006 class AnalysisErrorListener_22 implements AnalysisErrorListener { | 6006 class AnalysisErrorListener_26 implements AnalysisErrorListener { |
| 6007 void onError(AnalysisError event) { | 6007 void onError(AnalysisError event) { |
| 6008 JUnitTestCase.fail("Unexpected compilation error: ${event.message} (${event.
offset}, ${event.length})"); | 6008 JUnitTestCase.fail("Unexpected compilation error: ${event.message} (${event.
offset}, ${event.length})"); |
| 6009 } | 6009 } |
| 6010 } | 6010 } |
| 6011 /** | 6011 /** |
| 6012 * The class `ComplexParserTest` defines parser tests that test the parsing of m
ore complex | 6012 * The class `ComplexParserTest` defines parser tests that test the parsing of m
ore complex |
| 6013 * code fragments or the interactions between multiple parsing methods. For exam
ple, tests to ensure | 6013 * code fragments or the interactions between multiple parsing methods. For exam
ple, tests to ensure |
| 6014 * that the precedence of operations is being handled correctly should be define
d in this class. | 6014 * that the precedence of operations is being handled correctly should be define
d in this class. |
| 6015 * | 6015 * |
| 6016 * Simpler tests should be defined in the class [SimpleParserTest]. | 6016 * Simpler tests should be defined in the class [SimpleParserTest]. |
| (...skipping 3442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9459 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ
et, arg0) => target.validateModifiersForTopLevelFunction(arg0)), | 9459 'validateModifiersForTopLevelFunction_1': new MethodTrampoline(1, (Parser targ
et, arg0) => target.validateModifiersForTopLevelFunction(arg0)), |
| 9460 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ
et, arg0) => target.validateModifiersForTopLevelVariable(arg0)), | 9460 'validateModifiersForTopLevelVariable_1': new MethodTrampoline(1, (Parser targ
et, arg0) => target.validateModifiersForTopLevelVariable(arg0)), |
| 9461 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0)
=> target.validateModifiersForTypedef(arg0)),}; | 9461 'validateModifiersForTypedef_1': new MethodTrampoline(1, (Parser target, arg0)
=> target.validateModifiersForTypedef(arg0)),}; |
| 9462 | 9462 |
| 9463 | 9463 |
| 9464 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj
ects, Token tokenStream) { | 9464 Object invokeParserMethodImpl(Parser parser, String methodName, List<Object> obj
ects, Token tokenStream) { |
| 9465 parser.currentToken = tokenStream; | 9465 parser.currentToken = tokenStream; |
| 9466 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length}
']; | 9466 MethodTrampoline method = _methodTable_Parser['${methodName}_${objects.length}
']; |
| 9467 return method.invoke(parser, objects); | 9467 return method.invoke(parser, objects); |
| 9468 } | 9468 } |
| OLD | NEW |