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

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

Issue 10828169: 'Split && condition' quick assist. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« 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/DartIfStatement.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartIfStatement.java b/compiler/java/com/google/dart/compiler/ast/DartIfStatement.java
index ca835611a046c6010a674049dcfd0cc748b3ffba..10685f8fb5fa59a4b6dfbd9d1d51b2db9459a321 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartIfStatement.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartIfStatement.java
@@ -12,10 +12,15 @@ public class DartIfStatement extends DartStatement {
private DartExpression condition;
private DartStatement thenStmt;
private DartStatement elseStmt;
+ private final int closeParenOffset;
+ private final int elseTokenOffset;
- public DartIfStatement(DartExpression condition, DartStatement thenStmt, DartStatement elseStmt) {
+ public DartIfStatement(DartExpression condition, int closeParentOffset, DartStatement thenStmt,
+ int elseTokenOffset, DartStatement elseStmt) {
this.condition = becomeParentOf(condition);
+ closeParenOffset = closeParentOffset;
this.thenStmt = becomeParentOf(thenStmt);
+ this.elseTokenOffset = elseTokenOffset;
this.elseStmt = becomeParentOf(elseStmt);
}
@@ -23,14 +28,22 @@ public class DartIfStatement extends DartStatement {
return condition;
}
- public DartStatement getElseStatement() {
- return elseStmt;
+ public int getCloseParenOffset() {
+ return closeParenOffset;
}
public DartStatement getThenStatement() {
return thenStmt;
}
+ public int getElseTokenOffset() {
+ return elseTokenOffset;
+ }
+
+ public DartStatement getElseStatement() {
+ return elseStmt;
+ }
+
@Override
public void visitChildren(ASTVisitor<?> visitor) {
safelyVisitChild(condition, 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