| Index: compiler/java/com/google/dart/compiler/ast/LibraryNode.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/LibraryNode.java b/compiler/java/com/google/dart/compiler/ast/LibraryNode.java
|
| index 41227cf56545f483b6938fb402c7aab9b36f8841..683b725052d9f6d94461383a7e3632e648b15126 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/LibraryNode.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/LibraryNode.java
|
| @@ -4,8 +4,11 @@
|
|
|
| package com.google.dart.compiler.ast;
|
|
|
| +import com.google.common.collect.ImmutableList;
|
| import com.google.dart.compiler.common.AbstractNode;
|
|
|
| +import java.util.List;
|
| +
|
| /**
|
| * An element in a library.
|
| */
|
| @@ -13,6 +16,8 @@ public class LibraryNode extends AbstractNode {
|
|
|
| private final String text;
|
| private final String prefix;
|
| + private final List<ImportCombinator> combinators;
|
| + private final boolean exported;
|
|
|
| /**
|
| * Construct a new library node instance
|
| @@ -21,12 +26,17 @@ public class LibraryNode extends AbstractNode {
|
| * @param text the text comprising the node (not <code>null</code>)
|
| */
|
| public LibraryNode(String text) {
|
| - this(text, null);
|
| + this.text = text;
|
| + this.prefix = null;
|
| + this.combinators = ImmutableList.<ImportCombinator>of();
|
| + this.exported = false;
|
| }
|
|
|
| - public LibraryNode(String text, String prefix) {
|
| - this.text = text;
|
| - this.prefix = prefix;
|
| + public LibraryNode(DartImportDirective importDirective) {
|
| + this.text = importDirective.getLibraryUri().getValue();
|
| + this.prefix = importDirective.getPrefixValue();
|
| + this.combinators = importDirective.getCombinators();
|
| + this.exported = importDirective.isExported();
|
| }
|
|
|
| public String getText() {
|
| @@ -36,4 +46,12 @@ public class LibraryNode extends AbstractNode {
|
| public String getPrefix() {
|
| return prefix;
|
| }
|
| +
|
| + public List<ImportCombinator> getCombinators() {
|
| + return combinators;
|
| + }
|
| +
|
| + public boolean isExported() {
|
| + return exported;
|
| + }
|
| }
|
|
|