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

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

Issue 11377039: Issue 6251. Resolve and rename type and constructor references in [new Type.name]. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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: compiler/java/com/google/dart/compiler/ast/DartComment.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartComment.java b/compiler/java/com/google/dart/compiler/ast/DartComment.java
index c48e78713c113c66327c22c82cb82f691f4a3a4b..6f6e7d0dd8e94a1da09f7920470aefbf9302772f 100644
--- a/compiler/java/com/google/dart/compiler/ast/DartComment.java
+++ b/compiler/java/com/google/dart/compiler/ast/DartComment.java
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, 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.
@@ -7,8 +7,11 @@ package com.google.dart.compiler.ast;
import com.google.dart.compiler.Source;
import com.google.dart.compiler.common.SourceInfo;
+import java.util.List;
+
public class DartComment extends DartNode {
- private final NodeList<DartIdentifier> identifiers = NodeList.create(this);
+ private final NodeList<DartCommentRefName> refNames = NodeList.create(this);
+ private final NodeList<DartCommentNewName> newNames = NodeList.create(this);
@SuppressWarnings("unused")
private static final long serialVersionUID = 6066713446767517627L;
@@ -26,7 +29,7 @@ public class DartComment extends DartNode {
/**
* Return <code>true<code> if this comment is a block comment.
- *
+ *
* @return <code>true<code> if this comment is a block comment
*/
public boolean isBlock() {
@@ -35,7 +38,7 @@ public class DartComment extends DartNode {
/**
* Return <code>true<code> if this comment is a DartDoc comment.
- *
+ *
* @return <code>true<code> if this comment is a DartDoc comment
*/
public boolean isDartDoc() {
@@ -44,23 +47,42 @@ public class DartComment extends DartNode {
/**
* Return <code>true<code> if this comment is an end-of-line comment.
- *
+ *
* @return <code>true<code> if this comment is an end-of-line comment
*/
public boolean isEndOfLine() {
return style == Style.END_OF_LINE;
}
-
+
/**
* Adds <code>[id]</code> reference.
*/
- public void addTokenIdentifier(DartIdentifier id) {
- identifiers.add(id);
+ public void addRefName(DartCommentRefName name) {
+ refNames.add(name);
+ }
+
+ public NodeList<DartCommentRefName> getRefNames() {
+ return refNames;
+ }
+
+ /**
+ * Adds <code>[new Class]</code> or <b>[new Class.name]</b> reference.
+ */
+ public void addNewName(DartCommentNewName name) {
+ newNames.add(name);
+ }
+
+ /**
+ * @return the <code>[new Class]</code> or <b>[new Class.name]</b> references.
+ */
+ public List<DartCommentNewName> getNewNames() {
+ return newNames;
}
@Override
public void visitChildren(ASTVisitor<?> visitor) {
- identifiers.accept(visitor);
+ refNames.accept(visitor);
+ newNames.accept(visitor);
}
@Override

Powered by Google App Engine
This is Rietveld 408576698