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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ResolverVisitor.java

Issue 23495020: @proxy support the Analysis Engine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ResolverVisitor.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ResolverVisitor.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ResolverVisitor.java
index 9897662ab6372cd9bc9054f335fad277e180c37e..521c1d62961146a2b6637b115bcc2606e6267862 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ResolverVisitor.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ResolverVisitor.java
@@ -75,8 +75,11 @@ import com.google.dart.engine.element.LocalVariableElement;
import com.google.dart.engine.element.ParameterElement;
import com.google.dart.engine.element.PropertyInducingElement;
import com.google.dart.engine.element.VariableElement;
+import com.google.dart.engine.error.AnalysisError;
import com.google.dart.engine.error.AnalysisErrorListener;
+import com.google.dart.engine.error.ErrorCode;
import com.google.dart.engine.internal.type.BottomTypeImpl;
+import com.google.dart.engine.scanner.Token;
import com.google.dart.engine.scanner.TokenType;
import com.google.dart.engine.source.Source;
import com.google.dart.engine.type.FunctionType;
@@ -126,6 +129,11 @@ public class ResolverVisitor extends ScopedVisitor {
private TypeOverrideManager overrideManager = new TypeOverrideManager();
/**
+ * Proxy conditional error codes.
+ */
+ private ArrayList<ProxyConditionalAnalysisError> proxyConditionalAnalysisErrors = new ArrayList<ProxyConditionalAnalysisError>();
+
+ /**
* Initialize a newly created visitor to resolve the nodes in a compilation unit.
*
* @param library the library containing the compilation unit being resolved
@@ -166,6 +174,10 @@ public class ResolverVisitor extends ScopedVisitor {
return overrideManager;
}
+ public ArrayList<ProxyConditionalAnalysisError> getProxyConditionalAnalysisErrors() {
+ return proxyConditionalAnalysisErrors;
+ }
+
@Override
public Void visitAsExpression(AsExpression node) {
super.visitAsExpression(node);
@@ -801,6 +813,52 @@ public class ResolverVisitor extends ScopedVisitor {
}
}
+ /**
+ * Report a conditional analysis error with the given error code and arguments.
+ *
+ * @param enclosingElement the enclosing element
+ * @param errorCode the error code of the error to be reported
+ * @param node the node specifying the location of the error
+ * @param arguments the arguments to the error, used to compose the error message
+ */
+ protected void reportErrorProxyConditionalAnalysisError(Element enclosingElement,
+ ErrorCode errorCode, ASTNode node, Object... arguments) {
+ proxyConditionalAnalysisErrors.add(new ProxyConditionalAnalysisError(
+ enclosingElement,
+ new AnalysisError(getSource(), node.getOffset(), node.getLength(), errorCode, arguments)));
+ }
+
+ /**
+ * Report a conditional analysis error with the given error code and arguments.
+ *
+ * @param enclosingElement the enclosing element
+ * @param errorCode the error code of the error to be reported
+ * @param offset the offset of the location of the error
+ * @param length the length of the location of the error
+ * @param arguments the arguments to the error, used to compose the error message
+ */
+ protected void reportErrorProxyConditionalAnalysisError(Element enclosingElement,
+ ErrorCode errorCode, int offset, int length, Object... arguments) {
+ proxyConditionalAnalysisErrors.add(new ProxyConditionalAnalysisError(
+ enclosingElement,
+ new AnalysisError(getSource(), offset, length, errorCode, arguments)));
+ }
+
+ /**
+ * Report a conditional analysis error with the given error code and arguments.
+ *
+ * @param enclosingElement the enclosing element
+ * @param errorCode the error code of the error to be reported
+ * @param token the token specifying the location of the error
+ * @param arguments the arguments to the error, used to compose the error message
+ */
+ protected void reportErrorProxyConditionalAnalysisError(Element enclosingElement,
+ ErrorCode errorCode, Token token, Object... arguments) {
+ proxyConditionalAnalysisErrors.add(new ProxyConditionalAnalysisError(
+ enclosingElement,
+ new AnalysisError(getSource(), token.getOffset(), token.getLength(), errorCode, arguments)));
+ }
+
@Override
protected void visitForEachStatementInScope(ForEachStatement node) {
//

Powered by Google App Engine
This is Rietveld 408576698