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

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

Issue 765923003: Partial fix for issue 1934 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 void test_classTypeAlias_abstractAfterEq() { 843 void test_classTypeAlias_abstractAfterEq() {
844 // This syntax has been removed from the language in favor of 844 // This syntax has been removed from the language in favor of
845 // "abstract class A = B with C;" (issue 18098). 845 // "abstract class A = B with C;" (issue 18098).
846 ParserTestCase.parse3( 846 ParserTestCase.parse3(
847 "parseCompilationUnitMember", 847 "parseCompilationUnitMember",
848 <Object>[emptyCommentAndMetadata()], 848 <Object>[emptyCommentAndMetadata()],
849 "class A = abstract B with C;", 849 "class A = abstract B with C;",
850 [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.EXPECTED_TOKEN]); 850 [ParserErrorCode.EXPECTED_TOKEN, ParserErrorCode.EXPECTED_TOKEN]);
851 } 851 }
852 852
853 void test_colonInPlaceOfIn() {
854 ParserTestCase.parseStatement(
855 "for (var x : list) {}",
856 [ParserErrorCode.COLON_IN_PLACE_OF_IN]);
857 }
858
853 void test_constAndFinal() { 859 void test_constAndFinal() {
854 ParserTestCase.parse3( 860 ParserTestCase.parse3(
855 "parseClassMember", 861 "parseClassMember",
856 <Object>["C"], 862 <Object>["C"],
857 "const final int x;", 863 "const final int x;",
858 [ParserErrorCode.CONST_AND_FINAL]); 864 [ParserErrorCode.CONST_AND_FINAL]);
859 } 865 }
860 866
861 void test_constAndVar() { 867 void test_constAndVar() {
862 ParserTestCase.parse3( 868 ParserTestCase.parse3(
(...skipping 10087 matching lines...) Expand 10 before | Expand all | Expand 10 after
10950 // Parse the source. 10956 // Parse the source.
10951 // 10957 //
10952 Parser parser = new Parser(null, listener); 10958 Parser parser = new Parser(null, listener);
10953 return invokeParserMethodImpl( 10959 return invokeParserMethodImpl(
10954 parser, 10960 parser,
10955 methodName, 10961 methodName,
10956 <Object>[tokenStream], 10962 <Object>[tokenStream],
10957 tokenStream) as Token; 10963 tokenStream) as Token;
10958 } 10964 }
10959 } 10965 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698