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

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

Issue 10558014: Use operator location for operator resolving problems (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/ast/DartUnaryExpression.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartUnaryExpression.java b/compiler/java/com/google/dart/compiler/ast/DartUnaryExpression.java
index 159d45d00179571c3b00dda5fe1e289b09ac4b92..a41a521a42550705bc14ba622e04a42be4e9a0a8 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartUnaryExpression.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartUnaryExpression.java
@@ -14,16 +14,17 @@ import com.google.dart.compiler.resolver.MethodNodeElement;
public class DartUnaryExpression extends DartExpression {
private final Token operator;
+ private final int operatorOffset;
private DartExpression arg;
private final boolean isPrefix;
private MethodNodeElement element;
- public DartUnaryExpression(Token operator, DartExpression arg, boolean isPrefix) {
+ public DartUnaryExpression(Token operator, int operatorOffset, DartExpression arg, boolean isPrefix) {
assert operator.isUnaryOperator() || operator == Token.SUB;
-
- this.isPrefix = isPrefix;
this.operator = operator;
+ this.operatorOffset = operatorOffset;
this.arg = becomeParentOf(arg);
+ this.isPrefix = isPrefix;
}
public DartExpression getArg() {
@@ -34,6 +35,10 @@ public class DartUnaryExpression extends DartExpression {
return operator;
}
+ public int getOperatorOffset() {
+ return operatorOffset;
+ }
+
public boolean isPrefix() {
return isPrefix;
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698