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

Unified Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java

Issue 48623010: Issue 12694. Fix for parsing 'buildIn() {}' top-level functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
diff --git a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
index 910c2d99d49fcb94d01c83ed616c9ae62b6ced7c..01801f108002c7dedeb53a614be77d1c8b112f67 100644
--- a/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
+++ b/editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/parser/SimpleParserTest.java
@@ -1550,6 +1550,24 @@ public class SimpleParserTest extends ParserTestCase {
assertSize(1, unit.getDeclarations());
}
+ public void test_parseCompilationUnit_builtIn_asFunctionName() throws Exception {
+ parse("parseCompilationUnit", "abstract(x) => 0;");
+ parse("parseCompilationUnit", "as(x) => 0;");
+ parse("parseCompilationUnit", "dynamic(x) => 0;");
+ parse("parseCompilationUnit", "export(x) => 0;");
+ parse("parseCompilationUnit", "external(x) => 0;");
+ parse("parseCompilationUnit", "factory(x) => 0;");
+ parse("parseCompilationUnit", "get(x) => 0;");
+ parse("parseCompilationUnit", "implements(x) => 0;");
+ parse("parseCompilationUnit", "import(x) => 0;");
+ parse("parseCompilationUnit", "library(x) => 0;");
+ parse("parseCompilationUnit", "operator(x) => 0;");
+ parse("parseCompilationUnit", "part(x) => 0;");
+ parse("parseCompilationUnit", "set(x) => 0;");
+ parse("parseCompilationUnit", "static(x) => 0;");
+ parse("parseCompilationUnit", "typedef(x) => 0;");
+ }
+
public void test_parseCompilationUnit_directives_multiple() throws Exception {
CompilationUnit unit = parse("parseCompilationUnit", "library l;\npart 'a.dart';");
assertNull(unit.getScriptTag());

Powered by Google App Engine
This is Rietveld 408576698