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

Unified Diff: compiler/java/com/google/dart/compiler/parser/Terminals.java

Issue 10005040: Using annotations to help with parser recovery (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed unrelated file Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/parser/Terminals.java
diff --git a/compiler/java/com/google/dart/compiler/parser/Terminals.java b/compiler/java/com/google/dart/compiler/parser/Terminals.java
new file mode 100644
index 0000000000000000000000000000000000000000..85c8e67775ceda83dbaa10325cdfaebb1dcdaa85
--- /dev/null
+++ b/compiler/java/com/google/dart/compiler/parser/Terminals.java
@@ -0,0 +1,19 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package com.google.dart.compiler.parser;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Put this annotation on a method in {@link DartParser} so that code will not consume any tokens
+ * that a method further up on the stack can use to properly terminate a statement.
+ */
+@Retention(value=RetentionPolicy.RUNTIME)
+@Target(value=ElementType.METHOD)
+public @interface Terminals {
+ public Token[] tokens() default {};
+}

Powered by Google App Engine
This is Rietveld 408576698