| Index: compiler/java/com/google/dart/compiler/ast/ASTNodes.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/ASTNodes.java b/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
|
| index 82bc8559b9fcfde6da0cc261ab0b89b8af532c03..88a322f24edf282cca9233d1734ab20c8c351159 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
|
| @@ -29,6 +29,7 @@ import com.google.dart.compiler.type.TypeKind;
|
|
|
| import java.util.Collections;
|
| import java.util.List;
|
| +import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
| /**
|
| * Defines utility methods that operate on nodes in a Dart AST structure (instances of
|
| @@ -1429,5 +1430,20 @@ public class ASTNodes {
|
| return (DartIdentifier) constructor;
|
| }
|
| }
|
| +
|
| + /**
|
| + * @return <code>true</code> if given {@link DartNode} has {@link DartSuperExpression}.
|
| + */
|
| + public static boolean hasSuperInvocation(DartNode node) {
|
| + final AtomicBoolean result = new AtomicBoolean();
|
| + node.accept(new ASTVisitor<Void>() {
|
| + @Override
|
| + public Void visitSuperExpression(DartSuperExpression node) {
|
| + result.set(true);
|
| + return null;
|
| + }
|
| + });
|
| + return result.get();
|
| + }
|
|
|
| }
|
|
|