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

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

Issue 10546168: Issue 3540. Better error message for string concatenation (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/DartBinaryExpression.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java b/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
index fefae91f65586d377747581f90126dfd16b327af..4cd0107aba415ffc1bd06589c0f3b67a07747f82 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
@@ -14,11 +14,13 @@ import com.google.dart.compiler.resolver.MethodNodeElement;
public class DartBinaryExpression extends DartExpression {
private final Token op;
+ private final int opOffset;
private DartExpression arg1;
private DartExpression arg2;
private MethodNodeElement element;
- public DartBinaryExpression(Token op, DartExpression arg1, DartExpression arg2) {
+ public DartBinaryExpression(Token op, int opOffset, DartExpression arg1, DartExpression arg2) {
+ this.opOffset = opOffset;
assert op.isBinaryOperator() : op;
this.op = op;
@@ -37,6 +39,13 @@ public class DartBinaryExpression extends DartExpression {
public Token getOperator() {
return op;
}
+
+ /**
+ * @return the character offset of the {@link #getOperator()} token.
+ */
+ public int getOperatorOffset() {
+ return opOffset;
+ }
@Override
public void visitChildren(ASTVisitor<?> visitor) {
« 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