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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartSyntheticErrorIdentifier.java

Issue 10021017: Adds parser recovery for type parameters and type arguments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updates for completion to work 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/ast/DartSyntheticErrorIdentifier.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartSyntheticErrorIdentifier.java b/compiler/java/com/google/dart/compiler/ast/DartSyntheticErrorIdentifier.java
new file mode 100644
index 0000000000000000000000000000000000000000..2e7e96c533a0b13d7ffd9320c037a6860c9d72a6
--- /dev/null
+++ b/compiler/java/com/google/dart/compiler/ast/DartSyntheticErrorIdentifier.java
@@ -0,0 +1,32 @@
+// 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.ast;
+
+/**
+ * This node is created by the parser when it cannot find a proper identifier token in the input
+ * stream. The token might not have been consumed, or was a reserved word, so the name of the
+ * identifier is left blank.
+ */
+public class DartSyntheticErrorIdentifier extends DartIdentifier {
+
+ private final String tokenString;
+
+ public DartSyntheticErrorIdentifier() {
+ super("");
+ this.tokenString = "";
+ }
+
+ @Override
+ public <R> R accept(ASTVisitor<R> visitor) {
+ return visitor.visitSyntheticErrorIdentifier(this);
+ }
+
+ public String getTokenString() {
+ return tokenString;
+ }
+
+ @Override
+ public void visitChildren(ASTVisitor<?> visitor) {
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698