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

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

Issue 10661022: Issue 3752. Support for @override annotations (as structured doc comments) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
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) {

Powered by Google App Engine
This is Rietveld 408576698