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

Side by Side Diff: compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java

Issue 10539155: Fix in analyzer for consecutively labeled case statments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/DartParser.java ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 package com.google.dart.compiler.parser; 5 package com.google.dart.compiler.parser;
6 6
7 import com.google.common.base.Joiner; 7 import com.google.common.base.Joiner;
8 import com.google.dart.compiler.DartCompilerListener; 8 import com.google.dart.compiler.DartCompilerListener;
9 import com.google.dart.compiler.DartSourceTest; 9 import com.google.dart.compiler.DartSourceTest;
10 import com.google.dart.compiler.ast.DartArrayLiteral; 10 import com.google.dart.compiler.ast.DartArrayLiteral;
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 public void testBogusEscapedNewline() throws Exception { 626 public void testBogusEscapedNewline() throws Exception {
627 parseUnit("phony_bogus_escaped_newline.dart", 627 parseUnit("phony_bogus_escaped_newline.dart",
628 Joiner.on("\n").join( 628 Joiner.on("\n").join(
629 "class A {", 629 "class A {",
630 " var foo = \"not really multiline\\\n", 630 " var foo = \"not really multiline\\\n",
631 "\";", 631 "\";",
632 "}"), 632 "}"),
633 ParserErrorCode.UNEXPECTED_TOKEN, 2, 13, 633 ParserErrorCode.UNEXPECTED_TOKEN, 2, 13,
634 ParserErrorCode.EXPECTED_TOKEN, 4, 1); 634 ParserErrorCode.EXPECTED_TOKEN, 4, 1);
635 } 635 }
636
637 public void testLabelledCaseStatements() throws Exception {
638 parseUnit("phony_labelled_case_statements.dart",
639 Joiner.on("\n").join(
640 "method() {",
641 " switch(1) {",
642 " A: case 0:",
643 " B: case 1:",
644 " break;",
645 " }",
646 "}"));
647 }
636 } 648 }
OLDNEW
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/DartParser.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698