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

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

Issue 10832274: Initial parser changes for the new directive syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/ImportShowCombinator.java
===================================================================
--- compiler/java/com/google/dart/compiler/ast/ImportShowCombinator.java (revision 10597)
+++ compiler/java/com/google/dart/compiler/ast/ImportShowCombinator.java (working copy)
@@ -13,6 +13,8 @@
*/
package com.google.dart.compiler.ast;
+import java.util.List;
+
/**
* Instances of the class <code>ImportShowCombinator</code> represent a combinator that restricts
* the names being imported to those in a given list.
@@ -26,7 +28,7 @@
/**
* The list of names from the library that are made visible by this combinator.
*/
- private DartArrayLiteral shownNames;
+ private NodeList<DartIdentifier> shownNames = new NodeList<DartIdentifier>(this);
/**
* Initialize a newly created import show combinator.
@@ -40,8 +42,8 @@
*
* @param shownNames the list of names from the library that are made visible by this combinator
*/
- public ImportShowCombinator(DartArrayLiteral shownNames) {
- this.shownNames = becomeParentOf(shownNames);
+ public ImportShowCombinator(List<DartIdentifier> shownNames) {
+ this.shownNames.addAll(shownNames);
}
@Override
@@ -54,24 +56,14 @@
*
* @return the list of names from the library that are made visible by this combinator
*/
- public DartArrayLiteral getShownNames() {
+ public NodeList<DartIdentifier> getShownNames() {
return shownNames;
}
- /**
- * Set the list of names from the library that are made visible by this combinator to the given
- * list.
- *
- * @param shownNames the list of names from the library that are made visible by this combinator
- */
- public void setShownNames(DartArrayLiteral shownNames) {
- this.shownNames = becomeParentOf(shownNames);
- }
-
@Override
public void visitChildren(ASTVisitor<?> visitor) {
if (shownNames != null) {
- shownNames.visitChildren(visitor);
+ shownNames.accept(visitor);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698