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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ExpressionStatement.java

Issue 11364134: Merge libv1. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error Created 8 years, 1 month 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/ast/ExpressionStatement.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ExpressionStatement.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ExpressionStatement.java
index 6adb0330cf20a67897bef2f931ab81cb88c10304..c951e3824c38de745109974680f0b11d76364a5a 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ExpressionStatement.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/ast/ExpressionStatement.java
@@ -30,7 +30,8 @@ public class ExpressionStatement extends Statement {
private Expression expression;
/**
- * The semicolon terminating the statement.
+ * The semicolon terminating the statement, or {@code null} if the expression is a function
+ * expression and isn't followed by a semicolon.
*/
private Token semicolon;
@@ -63,7 +64,10 @@ public class ExpressionStatement extends Statement {
@Override
public Token getEndToken() {
- return semicolon;
+ if (semicolon != null) {
+ return semicolon;
+ }
+ return expression.getEndToken();
}
/**

Powered by Google App Engine
This is Rietveld 408576698