| OLD | NEW |
| 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.DartAnnotation; | 10 import com.google.dart.compiler.ast.DartAnnotation; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 public void test_identifier_as() { | 51 public void test_identifier_as() { |
| 52 parseUnit("identifier.dart", Joiner.on("\n").join( | 52 parseUnit("identifier.dart", Joiner.on("\n").join( |
| 53 "class G {", | 53 "class G {", |
| 54 " int as = 0;", | 54 " int as = 0;", |
| 55 "}")); | 55 "}")); |
| 56 } | 56 } |
| 57 | 57 |
| 58 public void test_index_literalMap() { | 58 public void test_index_literalMap() { |
| 59 parseUnit("test.dart", Joiner.on('\n').join( | 59 parseUnit("test.dart", Joiner.on('\n').join( |
| 60 "main() {", | 60 "main() {", |
| 61 " try { {'1' : 1, '2' : 2}['1']++; } catch(var e) {}", | 61 " try { {'1' : 1, '2' : 2}['1']++; } catch(e) {}", |
| 62 "}")); | 62 "}")); |
| 63 } | 63 } |
| 64 | 64 |
| 65 public void test_redirectingFactoryConstructor_const() { | 65 public void test_redirectingFactoryConstructor_const() { |
| 66 parseUnit("redirecting.dart", Joiner.on("\n").join( | 66 parseUnit("redirecting.dart", Joiner.on("\n").join( |
| 67 "class B {", | 67 "class B {", |
| 68 " const factory B.n(int x) = A.m;", | 68 " const factory B.n(int x) = A.m;", |
| 69 "}")); | 69 "}")); |
| 70 } | 70 } |
| 71 | 71 |
| (...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1402 "typedef func(var arg());", | 1402 "typedef func(var arg());", |
| 1403 ParserErrorCode.FUNCTION_TYPED_PARAMETER_IS_VAR, 1, 18); | 1403 ParserErrorCode.FUNCTION_TYPED_PARAMETER_IS_VAR, 1, 18); |
| 1404 } | 1404 } |
| 1405 | 1405 |
| 1406 public void test_finalInFunctionType() throws Exception { | 1406 public void test_finalInFunctionType() throws Exception { |
| 1407 parseUnit("phony_var_in_function_type.dart", | 1407 parseUnit("phony_var_in_function_type.dart", |
| 1408 "typedef func(final arg());", | 1408 "typedef func(final arg());", |
| 1409 ParserErrorCode.FUNCTION_TYPED_PARAMETER_IS_FINAL, 1, 20); | 1409 ParserErrorCode.FUNCTION_TYPED_PARAMETER_IS_FINAL, 1, 20); |
| 1410 } | 1410 } |
| 1411 } | 1411 } |
| OLD | NEW |