| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library engine.parser_test; | 5 library engine.parser_test; |
| 6 | 6 |
| 7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
| 8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
| 9 import 'package:analyzer/src/generated/error.dart'; | 9 import 'package:analyzer/src/generated/error.dart'; |
| 10 import 'package:analyzer/src/generated/incremental_scanner.dart'; | 10 import 'package:analyzer/src/generated/incremental_scanner.dart'; |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 "abstract C f;", | 772 "abstract C f;", |
| 773 [ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE]); | 773 [ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE]); |
| 774 } | 774 } |
| 775 | 775 |
| 776 void test_abstractTypeDef() { | 776 void test_abstractTypeDef() { |
| 777 ParserTestCase.parseCompilationUnit( | 777 ParserTestCase.parseCompilationUnit( |
| 778 "abstract typedef F();", | 778 "abstract typedef F();", |
| 779 [ParserErrorCode.ABSTRACT_TYPEDEF]); | 779 [ParserErrorCode.ABSTRACT_TYPEDEF]); |
| 780 } | 780 } |
| 781 | 781 |
| 782 void test_annotationOnEnumConstant_first() { |
| 783 ParserTestCase.parseCompilationUnit( |
| 784 "enum E { @override C }", |
| 785 [ParserErrorCode.ANNOTATION_ON_ENUM_CONSTANT]); |
| 786 } |
| 787 |
| 788 void test_annotationOnEnumConstant_middle() { |
| 789 ParserTestCase.parseCompilationUnit( |
| 790 "enum E { C, @override D, E }", |
| 791 [ParserErrorCode.ANNOTATION_ON_ENUM_CONSTANT]); |
| 792 } |
| 793 |
| 782 void test_assertDoesNotTakeAssignment() { | 794 void test_assertDoesNotTakeAssignment() { |
| 783 ParserTestCase.parse4( | 795 ParserTestCase.parse4( |
| 784 "parseAssertStatement", | 796 "parseAssertStatement", |
| 785 "assert(b = true);", | 797 "assert(b = true);", |
| 786 [ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT]); | 798 [ParserErrorCode.ASSERT_DOES_NOT_TAKE_ASSIGNMENT]); |
| 787 } | 799 } |
| 788 | 800 |
| 789 void test_assertDoesNotTakeCascades() { | 801 void test_assertDoesNotTakeCascades() { |
| 790 ParserTestCase.parse4( | 802 ParserTestCase.parse4( |
| 791 "parseAssertStatement", | 803 "parseAssertStatement", |
| (...skipping 10197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10989 // Parse the source. | 11001 // Parse the source. |
| 10990 // | 11002 // |
| 10991 Parser parser = new Parser(null, listener); | 11003 Parser parser = new Parser(null, listener); |
| 10992 return invokeParserMethodImpl( | 11004 return invokeParserMethodImpl( |
| 10993 parser, | 11005 parser, |
| 10994 methodName, | 11006 methodName, |
| 10995 <Object>[tokenStream], | 11007 <Object>[tokenStream], |
| 10996 tokenStream) as Token; | 11008 tokenStream) as Token; |
| 10997 } | 11009 } |
| 10998 } | 11010 } |
| OLD | NEW |