(5);
-// for (int i = 0; i < problems.length; i++) {
-// IProblem problem = problems[i];
-// boolean consider = false;
-// if ((severity & PROBLEMS) == PROBLEMS) {
-// consider = true;
-// } else if ((severity & WARNING) != 0) {
-// consider = problem.isWarning();
-// } else if ((severity & ERROR) != 0) {
-// consider = problem.isError();
-// }
-// if (consider) {
-// DartNode temp = node;
-// int count = iterations;
-// do {
-// int nodeOffset = temp.getStartPosition();
-// int problemOffset = problem.getSourceStart();
-// if (nodeOffset <= problemOffset && problemOffset < nodeOffset + temp.getLength()) {
-// result.add(problem);
-// count = 0;
-// } else {
-// count--;
-// }
-// } while ((temp = temp.getParent()) != null && count > 0);
-// }
-// }
-// return result.toArray(new IProblem[result.size()]);
-// }
-//
-// public static String getQualifier(Name name) {
-// if (name.isQualifiedName()) {
-// return ((QualifiedName) name).getQualifier().getFullyQualifiedName();
-// }
-// return ""; //$NON-NLS-1$
-// }
-//
-// /**
-// * Returns the receiver's type binding of the given method invocation.
-// *
-// * @param invocation method invocation to resolve type of
-// * @return the type binding of the receiver
-// */
-// public static ITypeBinding getReceiverTypeBinding(MethodInvocation invocation) {
-// ITypeBinding result = null;
-// Expression exp = invocation.getExpression();
-// if (exp != null) {
-// return exp.resolveTypeBinding();
-// } else {
-// AbstractTypeDeclaration type =
-// (AbstractTypeDeclaration) getParent(invocation, AbstractTypeDeclaration.class);
-// if (type != null) {
-// return type.resolveBinding();
-// }
-// }
-// return result;
-// }
-//
-// public static String getSimpleNameIdentifier(Name name) {
-// if (name.isQualifiedName()) {
-// return ((QualifiedName) name).getName().getIdentifier();
-// } else {
-// return ((SimpleName) name).getIdentifier();
-// }
-// }
-//
-// public static Name getTopMostName(Name name) {
-// Name result = name;
-// while (result.getParent() instanceof Name) {
-// result = (Name) result.getParent();
-// }
-// return result;
-// }
-//
-// public static Type getTopMostType(Type type) {
-// Type result = type;
-// while (result.getParent() instanceof Type) {
-// result = (Type) result.getParent();
-// }
-// return result;
-// }
-//
-// /**
-// * Returns the type node for the given declaration.
-// *
-// * @param declaration the declaration
-// * @return the type node
-// */
-// public static Type getType(VariableDeclaration declaration) {
-// if (declaration instanceof SingleVariableDeclaration) {
-// return ((SingleVariableDeclaration) declaration).getType();
-// } else if (declaration instanceof VariableDeclarationFragment) {
-// DartNode parent = ((VariableDeclarationFragment) declaration).getParent();
-// if (parent instanceof VariableDeclarationExpression) {
-// return ((VariableDeclarationExpression) parent).getType();
-// } else if (parent instanceof VariableDeclarationStatement) {
-// return ((VariableDeclarationStatement) parent).getType();
-// } else if (parent instanceof FieldDeclaration) {
-// return ((FieldDeclaration) parent).getType();
-// }
-// }
-// Assert.isTrue(false, "Unknown VariableDeclaration"); //$NON-NLS-1$
-// return null;
-// }
-//
-// public static ITypeBinding getTypeBinding(CompilationUnit root, IType type)
-// throws JavaModelException {
-// if (type.isAnonymous()) {
-// final IJavaElement parent = type.getParent();
-// if (parent instanceof IField && Flags.isEnum(((IMember) parent).getFlags())) {
-// final EnumConstantDeclaration constant =
-// (EnumConstantDeclaration) NodeFinder.perform(
-// root,
-// ((ISourceReference) parent).getSourceRange());
-// if (constant != null) {
-// final AnonymousClassDeclaration declaration = constant.getAnonymousClassDeclaration();
-// if (declaration != null) {
-// return declaration.resolveBinding();
-// }
-// }
-// } else {
-// final ClassInstanceCreation creation =
-// (ClassInstanceCreation) getParent(
-// NodeFinder.perform(root, type.getNameRange()),
-// ClassInstanceCreation.class);
-// if (creation != null) {
-// return creation.resolveTypeBinding();
-// }
-// }
-// } else {
-// final AbstractTypeDeclaration declaration =
-// (AbstractTypeDeclaration) getParent(
-// NodeFinder.perform(root, type.getNameRange()),
-// AbstractTypeDeclaration.class);
-// if (declaration != null) {
-// return declaration.resolveBinding();
-// }
-// }
-// return null;
-// }
-//
-// public static ITypeBinding getTypeBinding(Name node) {
-// IBinding binding = node.resolveBinding();
-// if (binding instanceof ITypeBinding) {
-// return (ITypeBinding) binding;
-// }
-// return null;
-// }
-//
-// public static String getTypeName(Type type) {
-// final StringBuffer buffer = new StringBuffer();
-// ASTVisitor visitor = new ASTVisitor() {
-// @Override
-// public void endVisit(ArrayType node) {
-// buffer.append("[]"); //$NON-NLS-1$
-// }
-//
-// @Override
-// public boolean visit(PrimitiveType node) {
-// buffer.append(node.getPrimitiveTypeCode().toString());
-// return false;
-// }
-//
-// @Override
-// public boolean visit(QualifiedName node) {
-// buffer.append(node.getName().getIdentifier());
-// return false;
-// }
-//
-// @Override
-// public boolean visit(SimpleName node) {
-// buffer.append(node.getIdentifier());
-// return false;
-// }
-// };
-// type.accept(visitor);
-// return buffer.toString();
-// }
-//
-// public static IVariableBinding getVariableBinding(Name node) {
-// IBinding binding = node.resolveBinding();
-// if (binding instanceof IVariableBinding) {
-// return (IVariableBinding) binding;
-// }
-// return null;
-// }
-//
-// /**
-// * Returns true if a node at a given location is a body of a control statement. Such body nodes
-// * are interesting as when replacing them, it has to be evaluates if a Block is needed instead.
-// * E.g. if (x) do(); -> if (x) { do1(); do2() }
-// *
-// * @param locationInParent Location of the body node
-// * @return Returns true if the location is a body node location of a control statement.
-// */
-// public static boolean isControlStatementBody(StructuralPropertyDescriptor locationInParent) {
-// return locationInParent == IfStatement.THEN_STATEMENT_PROPERTY
-// || locationInParent == IfStatement.ELSE_STATEMENT_PROPERTY
-// || locationInParent == ForStatement.BODY_PROPERTY
-// || locationInParent == EnhancedForStatement.BODY_PROPERTY
-// || locationInParent == WhileStatement.BODY_PROPERTY
-// || locationInParent == DoStatement.BODY_PROPERTY;
-// }
-//
-// public static boolean isDeclaration(Name name) {
-// if (name.isQualifiedName()) {
-// return ((QualifiedName) name).getName().isDeclaration();
-// } else {
-// return ((SimpleName) name).isDeclaration();
-// }
-// }
-//
-// /**
-// * Returns true if this is an existing node, i.e. it was created as part of a parsing process of a
-// * source code file. Returns false if this is a newly created node which has not yet been given a
-// * source position.
-// *
-// * @param node the node to be tested.
-// * @return true if this is an existing node, false if not.
-// */
-// public static boolean isExistingNode(DartNode node) {
-// return node.getStartPosition() != -1;
-// }
-//
-// public static boolean isLabel(SimpleName name) {
-// int parentType = name.getParent().getNodeType();
-// return parentType == DartNode.LABELED_STATEMENT
-// || parentType == DartNode.BREAK_STATEMENT
-// || parentType != DartNode.CONTINUE_STATEMENT;
-// }
-//
-// public static boolean isLiteral(Expression expression) {
-// int type = expression.getNodeType();
-// return type == DartNode.BOOLEAN_LITERAL
-// || type == DartNode.CHARACTER_LITERAL
-// || type == DartNode.NULL_LITERAL
-// || type == DartNode.NUMBER_LITERAL
-// || type == DartNode.STRING_LITERAL
-// || type == DartNode.TYPE_LITERAL;
-// }
-//
-// /**
-// * Returns true
iff parent
is a true ancestor of node
(i.e.
-// * returns false
if parent == node
).
-// *
-// * @param node node to test
-// * @param parent assumed parent
-// * @return true
iff parent
is a true ancestor of node
-// */
-// public static boolean isParent(DartNode node, DartNode parent) {
-// Assert.isNotNull(parent);
-// do {
-// node = node.getParent();
-// if (node == parent) {
-// return true;
-// }
-// } while (node != null);
-// return false;
-// }
-//
-// public static boolean isSingleDeclaration(VariableDeclaration declaration) {
-// Assert.isNotNull(declaration);
-// if (declaration instanceof SingleVariableDeclaration) {
-// return true;
-// } else if (declaration instanceof VariableDeclarationFragment) {
-// DartNode parent = declaration.getParent();
-// if (parent instanceof VariableDeclarationExpression) {
-// return ((VariableDeclarationExpression) parent).fragments().size() == 1;
-// } else if (parent instanceof VariableDeclarationStatement) {
-// return ((VariableDeclarationStatement) parent).fragments().size() == 1;
-// }
-// }
-// return false;
-// }
-//
-// public static boolean isStatic(BodyDeclaration declaration) {
-// return Modifier.isStatic(declaration.getModifiers());
-// }
-//
-// /**
-// * Adds flags to the given node and all its descendants.
-// *
-// * @param root The root node
-// * @param flags The flags to set
-// */
-// public static void setFlagsToAST(DartNode root, final int flags) {
-// root.accept(new GenericVisitor(true) {
-// @Override
-// protected boolean visitNode(DartNode node) {
-// node.setFlags(node.getFlags() | flags);
-// return true;
-// }
-// });
-// }
-//
-// private static int computeIterations(int flags) {
-// switch (flags) {
-// case NODE_ONLY:
-// return 1;
-// case INCLUDE_ALL_PARENTS:
-// return Integer.MAX_VALUE;
-// case INCLUDE_FIRST_PARENT:
-// return 2;
-// default:
-// return 1;
-// }
-// }
-//
-// private static int getOrderPreference(BodyDeclaration member, MembersOrderPreferenceCache store) {
-// int memberType = member.getNodeType();
-// int modifiers = member.getModifiers();
-//
-// switch (memberType) {
-// case DartNode.TYPE_DECLARATION:
-// case DartNode.ENUM_DECLARATION:
-// case DartNode.ANNOTATION_TYPE_DECLARATION:
-// return store.getCategoryIndex(MembersOrderPreferenceCache.TYPE_INDEX) * 2;
-// case DartNode.FIELD_DECLARATION:
-// if (Modifier.isStatic(modifiers)) {
-// int index = store.getCategoryIndex(MembersOrderPreferenceCache.STATIC_FIELDS_INDEX) * 2;
-// if (Modifier.isFinal(modifiers)) {
-// return index; // first final static, then static
-// }
-// return index + 1;
-// }
-// return store.getCategoryIndex(MembersOrderPreferenceCache.FIELDS_INDEX) * 2;
-// case DartNode.INITIALIZER:
-// if (Modifier.isStatic(modifiers)) {
-// return store.getCategoryIndex(MembersOrderPreferenceCache.STATIC_INIT_INDEX) * 2;
-// }
-// return store.getCategoryIndex(MembersOrderPreferenceCache.INIT_INDEX) * 2;
-// case DartNode.ANNOTATION_TYPE_MEMBER_DECLARATION:
-// return store.getCategoryIndex(MembersOrderPreferenceCache.METHOD_INDEX) * 2;
-// case DartNode.METHOD_DECLARATION:
-// if (Modifier.isStatic(modifiers)) {
-// return store.getCategoryIndex(MembersOrderPreferenceCache.STATIC_METHODS_INDEX) * 2;
-// }
-// if (((MethodDeclaration) member).isConstructor()) {
-// return store.getCategoryIndex(MembersOrderPreferenceCache.CONSTRUCTORS_INDEX) * 2;
-// }
-// return store.getCategoryIndex(MembersOrderPreferenceCache.METHOD_INDEX) * 2;
-// default:
-// return 100;
-// }
-// }
-//
-// /**
-// * Returns whether an expression at the given location needs explicit boxing.
-// *
-// * @param expression the expression
-// * @return true
iff an expression at the given location needs explicit boxing
-// */
-// private static boolean needsExplicitBoxing(Expression expression) {
-// StructuralPropertyDescriptor locationInParent = expression.getLocationInParent();
-// if (locationInParent == ParenthesizedExpression.EXPRESSION_PROPERTY) {
-// return needsExplicitBoxing((ParenthesizedExpression) expression.getParent());
-// }
-//
-// if (locationInParent == ClassInstanceCreation.EXPRESSION_PROPERTY
-// || locationInParent == FieldAccess.EXPRESSION_PROPERTY
-// || locationInParent == MethodInvocation.EXPRESSION_PROPERTY) {
-// return true;
-// }
-//
-// return false;
-// }
-
- private ASTNodes() {
- // no instance;
- }
-
- /**
- * Looks to see if the property access requires a getter.
- *
- * A property access requires a getter if it is on the right hand side of an assignment, or if it
- * is on the left hand side of an assignment and uses one of the assignment operators other than
- * plain '='.
- *
- * Note, that we don't check if given {@link DartNode} is actually field name.
- */
- public static boolean inGetterContext(DartNode node) {
- if (node.getParent() instanceof DartBinaryExpression) {
- DartBinaryExpression expr = (DartBinaryExpression) node.getParent();
- if (expr.getArg1() == node && expr.getOperator() == Token.ASSIGN) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Looks to see if the property access requires a setter.
- *
- * Basically, this boils down to any property access on the left hand side of an assignment.
- *
- * Keep in mind that an assignment of the form node = is the only kind of write-only
- * expression. Other types of assignments also read the value and require a getter access.
- *
- * Note, that we don't check if given {@link DartNode} is actually field name.
- */
- public static boolean inSetterContext(DartNode node) {
- if (node.getParent() instanceof DartUnaryExpression) {
- DartUnaryExpression expr = (DartUnaryExpression) node.getParent();
- return expr.getArg() == node && expr.getOperator().isCountOperator();
- }
- if (node.getParent() instanceof DartBinaryExpression) {
- DartBinaryExpression expr = (DartBinaryExpression) node.getParent();
- return expr.getArg1() == node && expr.getOperator().isAssignmentOperator();
- }
- return false;
- }
-
- /**
- * @return the {@link DartIdentifier} corresponding to the name of constructor.
- */
- public static DartIdentifier getConstructorNameNode(DartNewExpression node) {
- DartNode constructor = node.getConstructor();
- return getConstructorNameNode(constructor);
- }
-
- /**
- * @return the {@link DartIdentifier} corresponding to the name of constructor.
- */
- private static DartIdentifier getConstructorNameNode(DartNode constructor) {
- if (constructor instanceof DartPropertyAccess) {
- return ((DartPropertyAccess) constructor).getName();
- } else if (constructor instanceof DartTypeNode) {
- return getConstructorNameNode(((DartTypeNode) constructor).getIdentifier());
- } else {
- return (DartIdentifier) constructor;
- }
- }
-
- /**
- * @return true
if given {@link DartNode} has {@link DartSuperExpression}.
- */
- public static boolean hasSuperInvocation(DartNode node) {
- final AtomicBoolean result = new AtomicBoolean();
- node.accept(new ASTVisitor() {
- @Override
- public Void visitSuperExpression(DartSuperExpression node) {
- result.set(true);
- return null;
- }
- });
- return result.get();
- }
-
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/ASTVisitor.java b/compiler/java/com/google/dart/compiler/ast/ASTVisitor.java
deleted file mode 100644
index 6223fa0c9192..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/ASTVisitor.java
+++ /dev/null
@@ -1,411 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import java.util.List;
-
-/**
- * A visitor for abstract syntax tree.
- *
- *
- *
- * public R visitArrayAccess(DartArrayAccess node) {
- * // Actions before visiting subnodes.
- * node.visitChildren(this);
- * // Actions after visiting subnodes.
- * return node;
- * }
- *
- *
- *
- * In addition, this visitor takes advantage of the AST-node class hierarchy and makes it easy to
- * perform an action for, for example, all statements:
- *
- *
- *
- * public R visitStatement(DartStatement node) {
- * // Action that must be performed for all statements.
- * }
- *
- */
-public class ASTVisitor {
-
- public R visitNode(DartNode node) {
- node.visitChildren(this);
- return null;
- }
-
- public R visitNodeWithMetadata(DartNodeWithMetadata node) {
- return visitNode(node);
- }
-
- public R visitDirective(DartDirective node) {
- return visitNodeWithMetadata(node);
- }
-
- public R visitInvocation(DartInvocation node) {
- return visitExpression(node);
- }
-
- public R visitExportDirective(DartExportDirective node) {
- return visitDirective(node);
- }
-
- public R visitExpression(DartExpression node) {
- return visitNode(node);
- }
-
- public R visitStatement(DartStatement node) {
- return visitNode(node);
- }
-
- public R visitLiteral(DartLiteral node) {
- return visitExpression(node);
- }
-
- public R visitGotoStatement(DartGotoStatement node) {
- return visitStatement(node);
- }
-
- public R visitSwitchMember(DartSwitchMember node) {
- return visitNode(node);
- }
-
- public R visitDeclaration(DartDeclaration> node) {
- return visitNodeWithMetadata(node);
- }
-
- public R visitClassMember(DartClassMember> node) {
- return visitDeclaration(node);
- }
-
- public R visitComment(DartComment node) {
- return visitNode(node);
- }
-
- public R visitCommentNewName(DartCommentNewName node) {
- return visitNode(node);
- }
-
- public R visitCommentRefName(DartCommentRefName node) {
- return visitNode(node);
- }
-
- public R visitAnnotation(DartAnnotation node) {
- return visitNode(node);
- }
-
- public R visitArrayAccess(DartArrayAccess node) {
- return visitExpression(node);
- }
-
- public R visitArrayLiteral(DartArrayLiteral node) {
- return visitTypedLiteral(node);
- }
-
- public R visitBinaryExpression(DartBinaryExpression node) {
- return visitExpression(node);
- }
-
- public R visitBlock(DartBlock node) {
- return visitStatement(node);
- }
-
- public R visitReturnBlock(DartReturnBlock node) {
- return visitBlock(node);
- }
-
- public R visitBooleanLiteral(DartBooleanLiteral node) {
- return visitLiteral(node);
- }
-
- public R visitAssertStatement(DartAssertStatement node) {
- return visitStatement(node);
- }
-
- public R visitBreakStatement(DartBreakStatement node) {
- return visitGotoStatement(node);
- }
-
- public R visitFunctionObjectInvocation(DartFunctionObjectInvocation node) {
- return visitInvocation(node);
- }
-
- public R visitMethodInvocation(DartMethodInvocation node) {
- return visitInvocation(node);
- }
-
- public R visitUnqualifiedInvocation(DartUnqualifiedInvocation node) {
- return visitInvocation(node);
- }
-
- public R visitSuperConstructorInvocation(DartSuperConstructorInvocation node) {
- return visitInvocation(node);
- }
-
- public R visitCascadeExpression(DartCascadeExpression node) {
- return visitExpression(node);
- }
-
- public R visitCase(DartCase node) {
- return visitSwitchMember(node);
- }
-
- public R visitClass(DartClass node) {
- return visitDeclaration(node);
- }
-
- public R visitConditional(DartConditional node) {
- return visitExpression(node);
- }
-
- public R visitContinueStatement(DartContinueStatement node) {
- return visitGotoStatement(node);
- }
-
- public R visitDefault(DartDefault node) {
- return visitSwitchMember(node);
- }
-
- public R visitDoubleLiteral(DartDoubleLiteral node) {
- return visitLiteral(node);
- }
-
- public R visitDoWhileStatement(DartDoWhileStatement node) {
- return visitStatement(node);
- }
-
- public R visitEmptyStatement(DartEmptyStatement node) {
- return visitStatement(node);
- }
-
- public R visitExprStmt(DartExprStmt node) {
- return visitStatement(node);
- }
-
- public R visitField(DartField node) {
- return visitClassMember(node);
- }
-
- public R visitFieldDefinition(DartFieldDefinition node) {
- return visitNodeWithMetadata(node);
- }
-
- public R visitForInStatement(DartForInStatement node) {
- return visitStatement(node);
- }
-
- public R visitForStatement(DartForStatement node) {
- return visitStatement(node);
- }
-
- public R visitFunction(DartFunction node) {
- return visitNode(node);
- }
-
- public R visitFunctionExpression(DartFunctionExpression node) {
- return visitExpression(node);
- }
-
- public R visitFunctionTypeAlias(DartFunctionTypeAlias node) {
- return visitDeclaration(node);
- }
-
- public R visitClassTypeAlias(DartClassTypeAlias node) {
- return visitDeclaration(node);
- }
-
- public R visitIdentifier(DartIdentifier node) {
- return visitExpression(node);
- }
-
- public R visitIfStatement(DartIfStatement node) {
- return visitStatement(node);
- }
-
- public R visitImportCombinator(ImportCombinator node) {
- return visitNode(node);
- }
-
- public R visitImportDirective(DartImportDirective node) {
- return visitDirective(node);
- }
-
- public R visitImportHideCombinator(ImportHideCombinator node) {
- return visitImportCombinator(node);
- }
-
- public R visitImportShowCombinator(ImportShowCombinator node) {
- return visitImportCombinator(node);
- }
-
- public R visitInitializer(DartInitializer node) {
- return visitNode(node);
- }
-
- public R visitIntegerLiteral(DartIntegerLiteral node) {
- return visitLiteral(node);
- }
-
- public R visitLabel(DartLabel node) {
- return visitStatement(node);
- }
-
- public R visitLibraryDirective(DartLibraryDirective node) {
- return visitDirective(node);
- }
-
- public R visitTypedLiteral(DartTypedLiteral node) {
- return visitExpression(node);
- }
-
- public R visitMapLiteral(DartMapLiteral node) {
- return visitTypedLiteral(node);
- }
-
- public R visitMapLiteralEntry(DartMapLiteralEntry node) {
- return visitNode(node);
- }
-
- public R visitMethodDefinition(DartMethodDefinition node) {
- return visitClassMember(node);
- }
-
- public R visitNativeDirective(DartNativeDirective node) {
- return visitDirective(node);
- }
-
- public R visitNewExpression(DartNewExpression node) {
- return visitInvocation(node);
- }
-
- public R visitNullLiteral(DartNullLiteral node) {
- return visitLiteral(node);
- }
-
- public R visitParameter(DartParameter node) {
- return visitDeclaration(node);
- }
-
- public R visitParameterizedTypeNode(DartParameterizedTypeNode node) {
- return visitExpression(node);
- }
-
- public R visitParenthesizedExpression(DartParenthesizedExpression node) {
- return visitExpression(node);
- }
-
- public R visitPartOfDirective(DartPartOfDirective node) {
- return visitDirective(node);
- }
-
- public R visitPropertyAccess(DartPropertyAccess node) {
- return visitExpression(node);
- }
-
- public R visitTypeNode(DartTypeNode node) {
- return visitNode(node);
- }
-
- public R visitReturnStatement(DartReturnStatement node) {
- return visitStatement(node);
- }
-
- public R visitSourceDirective(DartSourceDirective node) {
- return visitDirective(node);
- }
-
- public R visitStringLiteral(DartStringLiteral node) {
- return visitLiteral(node);
- }
-
- public R visitStringInterpolation(DartStringInterpolation node) {
- return visitLiteral(node);
- }
-
- public R visitSuperExpression(DartSuperExpression node) {
- return visitExpression(node);
- }
-
- public R visitSwitchStatement(DartSwitchStatement node) {
- return visitStatement(node);
- }
-
- public R visitSyntheticErrorExpression(DartSyntheticErrorExpression node) {
- return visitExpression(node);
- }
-
- public R visitSyntheticErrorIdentifier(DartSyntheticErrorIdentifier node) {
- return visitIdentifier(node);
- }
-
- public R visitSyntheticErrorStatement(DartSyntheticErrorStatement node) {
- return visitStatement(node);
- }
-
- public R visitThisExpression(DartThisExpression node) {
- return visitExpression(node);
- }
-
- public R visitThrowExpression(DartThrowExpression node) {
- return visitExpression(node);
- }
-
- public R visitCatchBlock(DartCatchBlock node) {
- return visitStatement(node);
- }
-
- public R visitTryStatement(DartTryStatement node) {
- return visitStatement(node);
- }
-
- public R visitUnaryExpression(DartUnaryExpression node) {
- return visitExpression(node);
- }
-
- public R visitUnit(DartUnit node) {
- return visitNode(node);
- }
-
- public R visitVariable(DartVariable node) {
- return visitDeclaration(node);
- }
-
- public R visitVariableStatement(DartVariableStatement node) {
- return visitStatement(node);
- }
-
- public R visitWhileStatement(DartWhileStatement node) {
- return visitStatement(node);
- }
-
- public void visit(List extends DartNode> nodes) {
- if (nodes != null) {
- for (DartNode node : nodes) {
- node.accept(this);
- }
- }
- }
-
- public R visitNamedExpression(DartNamedExpression node) {
- return visitExpression(node);
- }
-
- public R visitTypeExpression(DartTypeExpression node) {
- return visitExpression(node);
- }
-
- public R visitTypeParameter(DartTypeParameter node) {
- return visitDeclaration(node);
- }
-
- public R visitNativeBlock(DartNativeBlock node) {
- return visitBlock(node);
- }
-
- public R visitRedirectConstructorInvocation(DartRedirectConstructorInvocation node) {
- return visitInvocation(node);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartAnnotation.java b/compiler/java/com/google/dart/compiler/ast/DartAnnotation.java
deleted file mode 100644
index ab44015decd2..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartAnnotation.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import java.util.List;
-
-
-/**
- * Instances of the class {@code DartAnnotation} represent metadata that can be associated with an
- * AST node.
- *
- *
- * metadata ::=
- * annotation*
- *
- * annotation ::=
- * '@' qualified ('.' identifier)? arguments?
- *
- */
-public class DartAnnotation extends DartNode {
- private DartExpression name;
-
- private NodeList arguments = NodeList.create(this);
-
- public DartAnnotation(DartExpression name, List arguments) {
- this.name = becomeParentOf(name);
- if (arguments != null) {
- this.arguments.addAll(arguments);
- }
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitAnnotation(this);
- }
-
- public DartExpression getName() {
- return name;
- }
-
- public NodeList getArguments() {
- return arguments;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- safelyVisitChild(name, visitor);
- arguments.accept(visitor);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartArrayAccess.java b/compiler/java/com/google/dart/compiler/ast/DartArrayAccess.java
deleted file mode 100644
index 959ac36e03a7..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartArrayAccess.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import com.google.dart.compiler.resolver.Element;
-import com.google.dart.compiler.resolver.MethodNodeElement;
-
-/**
- * Represents a Dart array access expression (a[b]).
- */
-public class DartArrayAccess extends DartExpression {
-
- private DartExpression target;
- private boolean isCascade;
- private DartExpression key;
- private MethodNodeElement element;
-
- public DartArrayAccess(DartExpression target, DartExpression key) {
- this(target, false, key);
- }
-
- public DartArrayAccess(DartExpression target, boolean isCascade, DartExpression key) {
- this.target = becomeParentOf(target);
- this.isCascade = isCascade;
- this.key = becomeParentOf(key);
- }
-
- @Override
- public boolean isAssignable() {
- return true;
- }
-
- public boolean isCascade() {
- return isCascade;
- }
-
- public DartExpression getKey() {
- return key;
- }
-
- public DartExpression getTarget() {
- return target;
- }
-
- public DartExpression getRealTarget() {
- if (isCascade) {
- DartNode ancestor = getParent();
- while (!(ancestor instanceof DartCascadeExpression)) {
- if (ancestor == null) {
- return target;
- }
- ancestor = ancestor.getParent();
- }
- return ((DartCascadeExpression) ancestor).getTarget();
- }
- return target;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- safelyVisitChild(target, visitor);
- safelyVisitChild(key, visitor);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitArrayAccess(this);
- }
-
- @Override
- public MethodNodeElement getElement() {
- return element;
- }
-
- @Override
- public void setElement(Element element) {
- this.element = (MethodNodeElement) element;
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartArrayLiteral.java b/compiler/java/com/google/dart/compiler/ast/DartArrayLiteral.java
deleted file mode 100644
index 5c9ad5fb8c21..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartArrayLiteral.java
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import java.util.List;
-
-/**
- * Represents a Dart array literal value.
- */
-public class DartArrayLiteral extends DartTypedLiteral {
-
- private final NodeList expressions = NodeList.create(this);
-
- public DartArrayLiteral(boolean isConst, List typeArguments,
- List expressions) {
- super(isConst, typeArguments);
- this.expressions.addAll(expressions);
- }
-
- public List getExpressions() {
- return expressions;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- super.visitChildren(visitor);
- expressions.accept(visitor);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitArrayLiteral(this);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartAssertStatement.java b/compiler/java/com/google/dart/compiler/ast/DartAssertStatement.java
deleted file mode 100644
index 91572a23109a..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartAssertStatement.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-/**
- * Represents a Dart 'assert' statement.
- */
-public class DartAssertStatement extends DartStatement {
-
- private final DartExpression condition;
-
- public DartAssertStatement(DartExpression condition) {
- this.condition = becomeParentOf(condition);
- }
-
- public DartExpression getCondition() {
- return condition;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- safelyVisitChild(condition, visitor);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitAssertStatement(this);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java b/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
deleted file mode 100644
index 25017d28440d..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartBinaryExpression.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import com.google.dart.compiler.parser.Token;
-import com.google.dart.compiler.resolver.Element;
-import com.google.dart.compiler.resolver.MethodNodeElement;
-
-/**
- * Represents a Dart binary expression.
- */
-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, int opOffset, DartExpression arg1, DartExpression arg2) {
- this.opOffset = opOffset;
- assert op.isBinaryOperator() : op;
-
- this.op = op;
- this.arg1 = becomeParentOf(arg1 != null ? arg1 : new DartSyntheticErrorExpression());
- this.arg2 = becomeParentOf(arg2 != null ? arg2 : new DartSyntheticErrorExpression());
- }
-
- public DartExpression getArg1() {
- return arg1;
- }
-
- public DartExpression getArg2() {
- return arg2;
- }
-
- 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) {
- safelyVisitChild(arg1, visitor);
- safelyVisitChild(arg2, visitor);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitBinaryExpression(this);
- }
-
- @Override
- public MethodNodeElement getElement() {
- return element;
- }
-
- @Override
- public void setElement(Element element) {
- this.element = (MethodNodeElement) element;
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartBlock.java b/compiler/java/com/google/dart/compiler/ast/DartBlock.java
deleted file mode 100644
index 27d0d0580285..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartBlock.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import java.util.List;
-
-/**
- * Represents a Dart statement block.
- */
-public class DartBlock extends DartStatement {
-
- private final NodeList statements = NodeList.create(this);
-
- public DartBlock(List statements) {
- if (statements != null && !statements.isEmpty()) {
- this.statements.addAll(statements);
- }
- }
-
- public List getStatements() {
- return statements;
- }
-
- @Override
- public boolean isAbruptCompletingStatement() {
- for (DartStatement stmt : statements) {
- if (stmt.isAbruptCompletingStatement()) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- statements.accept(visitor);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitBlock(this);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartBooleanLiteral.java b/compiler/java/com/google/dart/compiler/ast/DartBooleanLiteral.java
deleted file mode 100644
index cdf51600dace..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartBooleanLiteral.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-/**
- * Represents a Dart boolean literal value.
- */
-public class DartBooleanLiteral extends DartLiteral {
-
- public static DartBooleanLiteral get(boolean value) {
- return new DartBooleanLiteral(value);
- }
-
- private final boolean value;
-
- private DartBooleanLiteral(boolean value) {
- this.value = value;
- }
-
- public boolean getValue() {
- return value;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitBooleanLiteral(this);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartBreakStatement.java b/compiler/java/com/google/dart/compiler/ast/DartBreakStatement.java
deleted file mode 100644
index 7d51c330d708..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartBreakStatement.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-/**
- * Represents a Dart 'break' statement.
- */
-public class DartBreakStatement extends DartGotoStatement {
-
- public DartBreakStatement(DartIdentifier label) {
- super(label);
- }
-
- @Override
- public boolean isAbruptCompletingStatement() {
- return true;
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitBreakStatement(this);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartCascadeExpression.java b/compiler/java/com/google/dart/compiler/ast/DartCascadeExpression.java
deleted file mode 100644
index 6c9b2b812b5f..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartCascadeExpression.java
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import java.util.List;
-
-/**
- * Instances of the class {@code DartCascadeExpression} represent a sequence of cascaded expressions:
- * expressions that share a common target. There are three kinds of expressions that can be used in
- * a cascade expression: {@link DartArrayAccess}, {@link DartMethodInvocation} and {@link DartPropertyAccess}.
- *
- *
- * cascadeExpression ::=
- * {@link DartExpression conditionalExpression} cascadeSection*
- *
- * cascadeSection ::=
- * '..' (cascadeSelector arguments*) (assignableSelector arguments*)* (assignmentOperator expressionWithoutCascade)?
- *
- * cascadeSelector ::=
- * '[ ' expression '] '
- * | identifier
- *
- */
-public class DartCascadeExpression extends DartExpression {
- /**
- * The target of the cascade sections.
- */
- private DartExpression target;
-
- /**
- * The cascade sections sharing the common target.
- */
- private NodeList cascadeSections = new NodeList(this);
-
- /**
- * Initialize a newly created cascade expression.
- *
- * @param target the target of the cascade sections
- * @param cascadeSections the cascade sections sharing the common target
- */
- public DartCascadeExpression(DartExpression target, List cascadeSections) {
- this.target = becomeParentOf(target);
- this.cascadeSections.addAll(cascadeSections);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitCascadeExpression(this);
- }
-
- /**
- * Return the cascade sections sharing the common target.
- *
- * @return the cascade sections sharing the common target
- */
- public NodeList getCascadeSections() {
- return cascadeSections;
- }
-
- /**
- * Return the target of the cascade sections.
- *
- * @return the target of the cascade sections
- */
- public DartExpression getTarget() {
- return target;
- }
-
- /**
- * Set the target of the cascade sections to the given expression.
- *
- * @param target the target of the cascade sections
- */
- public void setTarget(DartExpression target) {
- this.target = becomeParentOf(target);
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- safelyVisitChild(target, visitor);
- cascadeSections.accept(visitor);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartCase.java b/compiler/java/com/google/dart/compiler/ast/DartCase.java
deleted file mode 100644
index 5285fd354e3a..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartCase.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import java.util.List;
-
-/**
- * Represents a Dart 'case' switch member.
- */
-public class DartCase extends DartSwitchMember {
-
- private DartExpression expr;
-
- public DartCase(DartExpression expr, List labels, List statements) {
- super(labels, statements);
- this.expr = becomeParentOf(expr);
- }
-
- public DartExpression getExpr() {
- return expr;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- safelyVisitChild(expr, visitor);
- super.visitChildren(visitor);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitCase(this);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartCatchBlock.java b/compiler/java/com/google/dart/compiler/ast/DartCatchBlock.java
deleted file mode 100644
index 6ab02f5af492..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartCatchBlock.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-/**
- * Represents a Dart 'catch' block.
- */
-public class DartCatchBlock extends DartStatement {
- private final int onTokenOffset;
- private final DartParameter exception;
- private final DartParameter stackTrace;
- private final DartBlock block;
-
- public DartCatchBlock(DartBlock block,
- int onTokenOffset,
- DartParameter exception,
- DartParameter stackTrace) {
- this.block = becomeParentOf(block);
- this.onTokenOffset = onTokenOffset;
- this.exception = becomeParentOf(exception);
- this.stackTrace = becomeParentOf(stackTrace);
- }
-
- public int getOnTokenOffset() {
- return onTokenOffset;
- }
-
- public DartParameter getException() {
- return exception;
- }
-
- public DartParameter getStackTrace() {
- return stackTrace;
- }
-
- public DartBlock getBlock() {
- return block;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- safelyVisitChild(exception, visitor);
- safelyVisitChild(stackTrace, visitor);
- safelyVisitChild(block, visitor);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitCatchBlock(this);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartClass.java b/compiler/java/com/google/dart/compiler/ast/DartClass.java
deleted file mode 100644
index ede1696b6b77..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartClass.java
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import com.google.dart.compiler.resolver.ClassNodeElement;
-import com.google.dart.compiler.resolver.Element;
-
-import java.util.List;
-
-/**
- * Represents a Dart class.
- */
-public class DartClass extends DartDeclaration {
-
- private ClassNodeElement element;
-
- private DartTypeNode superclass;
-
- private final NodeList members = NodeList.create(this);
- private final NodeList typeParameters = NodeList.create(this);
- private final NodeList interfaces = NodeList.create(this);
- private final NodeList mixins = NodeList.create(this);
-
- private boolean isInterface;
- private DartParameterizedTypeNode defaultClass;
- private final Modifiers modifiers;
-
- // If the Dart class is implemented by a native JS class the nativeName
- // points to the JS class. Otherwise it is null.
- private final DartStringLiteral nativeName;
-
- private final int tokenOffset;
- private final int tokenLength;
- private final int defaultTokenOffset;
- private final int implementsOffset;
- private final int openBraceOffset;
- private final int closeBraceOffset;
-
- public DartClass(int tokenOffset, int tokenLength, DartIdentifier name,
- DartStringLiteral nativeName, DartTypeNode superclass, int implementsOffset,
- List interfaces, List mixins, int defaultTokenOffset,
- int openBraceOffset, int closeBraceOffset, List members,
- List typeParameters, DartParameterizedTypeNode defaultClass,
- boolean isInterface, Modifiers modifiers) {
- super(name);
- this.tokenOffset = tokenOffset;
- this.tokenLength = tokenLength;
- this.nativeName = becomeParentOf(nativeName);
- this.superclass = becomeParentOf(superclass);
- this.defaultTokenOffset = defaultTokenOffset;
- this.openBraceOffset = openBraceOffset;
- this.closeBraceOffset = closeBraceOffset;
- this.members.addAll(members);
- this.typeParameters.addAll(typeParameters);
- this.implementsOffset = implementsOffset;
- this.interfaces.addAll(interfaces);
- this.mixins.addAll(mixins);
- this.defaultClass = becomeParentOf(defaultClass);
- this.isInterface = isInterface;
- this.modifiers = modifiers;
- }
-
- public boolean isInterface() {
- return isInterface;
- }
-
- public Modifiers getModifiers() {
- return modifiers;
- }
-
- public boolean isAbstract() {
- if (modifiers.isAbstract()) {
- return true;
- }
- for (DartNode node : members) {
- if (node instanceof DartMethodDefinition) {
- DartMethodDefinition methodDefinition = (DartMethodDefinition) node;
- if (methodDefinition.getModifiers().isAbstract()) {
- return true;
- }
- }
- if (node instanceof DartFieldDefinition) {
- DartFieldDefinition fieldDefinition = (DartFieldDefinition) node;
- for (DartField field : fieldDefinition.getFields()) {
- if (field.getModifiers().isAbstract()) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- public int getTokenOffset() {
- return tokenOffset;
- }
-
- public int getTokenLength() {
- return tokenLength;
- }
-
- public int getDefaultTokenOffset() {
- return defaultTokenOffset;
- }
-
- public int getOpenBraceOffset() {
- return openBraceOffset;
- }
-
- public int getCloseBraceOffset() {
- return closeBraceOffset;
- }
-
- public List getMembers() {
- return members;
- }
-
- public List getTypeParameters() {
- return typeParameters;
- }
-
- public int getImplementsOffset() {
- return implementsOffset;
- }
-
- public List getInterfaces() {
- return interfaces;
- }
-
- public NodeList getMixins() {
- return mixins;
- }
-
- public String getClassName() {
- if (getName() == null) {
- return null;
- }
- return getName().getName();
- }
-
- public DartTypeNode getSuperclass() {
- return superclass;
- }
-
- public DartParameterizedTypeNode getDefaultClass() {
- return defaultClass;
- }
-
- public Element getDefaultSymbol() {
- if (defaultClass != null) {
- return defaultClass.getType().getElement();
- } else {
- return null;
- }
- }
-
- public Element getSuperSymbol() {
- if (superclass != null) {
- return superclass.getType().getElement();
- } else {
- return null;
- }
- }
-
- @Override
- public ClassNodeElement getElement() {
- return element;
- }
-
- public void setDefaultClass(DartParameterizedTypeNode newName) {
- defaultClass = becomeParentOf(newName);
- }
-
- public void setSuperclass(DartTypeNode newName) {
- superclass = becomeParentOf(newName);
- }
-
- @Override
- public void setElement(Element element) {
- this.element = (ClassNodeElement) element;
- }
-
- public DartStringLiteral getNativeName() {
- return nativeName;
- }
-
- @Override
- public void visitChildren(ASTVisitor> visitor) {
- super.visitChildren(visitor);
- typeParameters.accept(visitor);
- safelyVisitChild(superclass, visitor);
- interfaces.accept(visitor);
- mixins.accept(visitor);
- safelyVisitChild(defaultClass, visitor);
- members.accept(visitor);
- }
-
- @Override
- public R accept(ASTVisitor visitor) {
- return visitor.visitClass(this);
- }
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartClassMember.java b/compiler/java/com/google/dart/compiler/ast/DartClassMember.java
deleted file mode 100644
index 2e5a2bfdcd0d..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartClassMember.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import com.google.dart.compiler.resolver.NodeElement;
-
-/**
- * Base class for class members (fields and methods).
- */
-public abstract class DartClassMember extends DartDeclaration {
-
- private final Modifiers modifiers;
-
- protected DartClassMember(N name, Modifiers modifiers) {
- super(name);
- this.modifiers = modifiers;
- }
-
- public Modifiers getModifiers() {
- return modifiers;
- }
-
- @Override
- public abstract NodeElement getElement();
-}
diff --git a/compiler/java/com/google/dart/compiler/ast/DartClassTypeAlias.java b/compiler/java/com/google/dart/compiler/ast/DartClassTypeAlias.java
deleted file mode 100644
index a5c35c0dac58..000000000000
--- a/compiler/java/com/google/dart/compiler/ast/DartClassTypeAlias.java
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.ast;
-
-import com.google.dart.compiler.resolver.ClassNodeElement;
-import com.google.dart.compiler.resolver.Element;
-
-import java.util.List;
-
-/**
- * Instances of the class {@code DartClassTypeAlias} represent a class type alias.
- */
-public class DartClassTypeAlias extends DartDeclaration {
- private final NodeList typeParameters = NodeList.create(this);
- private final Modifiers modifiers;
- private final DartTypeNode superclass;
- private final NodeList mixins = NodeList.create(this);
- private final NodeList interfaces = NodeList.create(this);
- private ClassNodeElement element;
-
- public DartClassTypeAlias(DartIdentifier name, List typeParameters,
- Modifiers modifiers, DartTypeNode superclass, List mixins,
- List interfaces) {
- super(name);
- this.typeParameters.addAll(typeParameters);
- this.modifiers = modifiers;
- this.superclass = becomeParentOf(superclass);
- this.mixins.addAll(mixins);
- this.interfaces.addAll(interfaces);
- }
-
- public List getTypeParameters() {
- return typeParameters;
- }
-
- public Modifiers getModifiers() {
- return modifiers;
- }
-
- public boolean isAbstract() {
- return modifiers.isAbstract();
- }
-
- public DartTypeNode getSuperclass() {
- return superclass;
- }
-
- public NodeList