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

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

Issue 781133002: Fix for issue 4070 (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 2342 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 "(a, b])", 2353 "(a, b])",
2354 [ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP]); 2354 [ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP]);
2355 } 2355 }
2356 2356
2357 void test_unexpectedToken_endOfFieldDeclarationStatement() { 2357 void test_unexpectedToken_endOfFieldDeclarationStatement() {
2358 ParserTestCase.parseStatement( 2358 ParserTestCase.parseStatement(
2359 "String s = (null));", 2359 "String s = (null));",
2360 [ParserErrorCode.UNEXPECTED_TOKEN]); 2360 [ParserErrorCode.UNEXPECTED_TOKEN]);
2361 } 2361 }
2362 2362
2363 void test_unexpectedToken_returnInExpressionFuntionBody() {
2364 ParserTestCase.parseCompilationUnit(
2365 "f() => return null;",
2366 [ParserErrorCode.UNEXPECTED_TOKEN]);
2367 }
2368
2363 void test_unexpectedToken_semicolonBetweenClassMembers() { 2369 void test_unexpectedToken_semicolonBetweenClassMembers() {
2364 ParserTestCase.parse3( 2370 ParserTestCase.parse3(
2365 "parseClassDeclaration", 2371 "parseClassDeclaration",
2366 <Object>[emptyCommentAndMetadata(), null], 2372 <Object>[emptyCommentAndMetadata(), null],
2367 "class C { int x; ; int y;}", 2373 "class C { int x; ; int y;}",
2368 [ParserErrorCode.UNEXPECTED_TOKEN]); 2374 [ParserErrorCode.UNEXPECTED_TOKEN]);
2369 } 2375 }
2370 2376
2371 void test_unexpectedToken_semicolonBetweenCompilationUnitMembers() { 2377 void test_unexpectedToken_semicolonBetweenCompilationUnitMembers() {
2372 ParserTestCase.parseCompilationUnit( 2378 ParserTestCase.parseCompilationUnit(
(...skipping 8571 matching lines...) Expand 10 before | Expand all | Expand 10 after
10944 // Parse the source. 10950 // Parse the source.
10945 // 10951 //
10946 Parser parser = new Parser(null, listener); 10952 Parser parser = new Parser(null, listener);
10947 return invokeParserMethodImpl( 10953 return invokeParserMethodImpl(
10948 parser, 10954 parser,
10949 methodName, 10955 methodName,
10950 <Object>[tokenStream], 10956 <Object>[tokenStream],
10951 tokenStream) as Token; 10957 tokenStream) as Token;
10952 } 10958 }
10953 } 10959 }
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