| Index: compiler/java/com/google/dart/compiler/ast/DartDeclaration.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/DartDeclaration.java b/compiler/java/com/google/dart/compiler/ast/DartDeclaration.java
|
| index 6d540e484e8ce1b7b74caf9772b6d60b2921a61b..6f5bd25e78eff73f3146852b6cfcff219125c9c4 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/DartDeclaration.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/DartDeclaration.java
|
| @@ -1,20 +1,20 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// 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;
|
|
|
| -
|
| /**
|
| - * Common supertype for most declarations. A declaration introduces a new name
|
| - * in a scope. Certain tools, such as the IDE, need to know the location of this
|
| - * name, but the name should otherwise be considered a part of the declaration,
|
| - * not an independent node. So the name is not visited when traversing the AST.
|
| + * Common supertype for most declarations. A declaration introduces a new name in a scope. Certain
|
| + * tools, such as the IDE, need to know the location of this name, but the name should otherwise be
|
| + * considered a part of the declaration, not an independent node. So the name is not visited when
|
| + * traversing the AST.
|
| */
|
| public abstract class DartDeclaration<N extends DartExpression> extends DartNode {
|
|
|
| private N name; // Not visited.
|
| private DartComment dartDoc;
|
| + private DartMetadata metadata = DartMetadata.EMPTY;
|
|
|
| protected DartDeclaration(N name) {
|
| this.name = becomeParentOf(name);
|
| @@ -36,7 +36,15 @@ public abstract class DartDeclaration<N extends DartExpression> extends DartNode
|
| // dartDoc is still parented by the containing DartUnit.
|
| this.dartDoc = dartDoc;
|
| }
|
| -
|
| +
|
| + public DartMetadata getMetadata() {
|
| + return metadata;
|
| + }
|
| +
|
| + public void setMetadata(DartMetadata metadata) {
|
| + this.metadata = metadata;
|
| + }
|
| +
|
| @Override
|
| public void visitChildren(ASTVisitor<?> visitor) {
|
| if (name != null) {
|
|
|