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

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

Issue 20722006: Removed compiler/ directory from repository (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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: dart/compiler/java/com/google/dart/compiler/ast/DartImportDirective.java
diff --git a/dart/compiler/java/com/google/dart/compiler/ast/DartImportDirective.java b/dart/compiler/java/com/google/dart/compiler/ast/DartImportDirective.java
deleted file mode 100644
index 5c79e7852650a0601a0a30f831b71ce8a175dab5..0000000000000000000000000000000000000000
--- a/dart/compiler/java/com/google/dart/compiler/ast/DartImportDirective.java
+++ /dev/null
@@ -1,94 +0,0 @@
-// 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;
-
-import java.util.List;
-
-/**
- * Implements the import directive.
- */
-public class DartImportDirective extends DartDirective {
- private boolean obsoleteFormat;
-
- private DartStringLiteral libraryUri;
-
- private DartIdentifier prefix;
-
- private NodeList<ImportCombinator> combinators = new NodeList<ImportCombinator>(this);
-
- // TODO(brianwilkerson) Remove this field once the obsolete format is no longer supported.
- private boolean exported;
-
- private DartStringLiteral oldPrefix;
-
- public DartImportDirective(DartStringLiteral libraryUri, DartIdentifier prefix, List<ImportCombinator> combinators) {
- obsoleteFormat = false;
- this.libraryUri = becomeParentOf(libraryUri);
- this.prefix = becomeParentOf(prefix);
- this.combinators.addAll(combinators);
- this.exported = false;
- }
-
- public DartImportDirective(DartStringLiteral libraryUri, DartBooleanLiteral exported, List<ImportCombinator> combinators, DartStringLiteral prefix) {
- obsoleteFormat = true;
- this.libraryUri = becomeParentOf(libraryUri);
- this.combinators.addAll(combinators);
- this.oldPrefix = becomeParentOf(prefix);
- this.exported = exported != null;
- }
-
- public DartStringLiteral getLibraryUri() {
- return libraryUri;
- }
-
- public boolean isExported() {
- // TODO(brianwilkerson) Remove this method once the obsolete format is no longer supported.
- return exported;
- }
-
- public boolean isObsoleteFormat() {
- // TODO(brianwilkerson) Remove this method once the obsolete format is no longer supported.
- return obsoleteFormat;
- }
-
- public List<ImportCombinator> getCombinators() {
- return combinators;
- }
-
- public String getPrefixValue() {
- if (prefix != null) {
- return prefix.getName();
- }
- // TODO(brianwilkerson) Remove this part once the obsolete format is no longer supported.
- if (oldPrefix != null) {
- return oldPrefix.getValue();
- }
- return null;
- }
-
- @Deprecated
- public DartStringLiteral getOldPrefix() {
- // TODO(brianwilkerson) Remove this method once the obsolete format is no longer supported.
- return oldPrefix;
- }
-
- public DartIdentifier getPrefix() {
- return prefix;
- }
-
- @Override
- public void visitChildren(ASTVisitor<?> visitor) {
- super.visitChildren(visitor);
- safelyVisitChild(libraryUri, visitor);
- safelyVisitChild(prefix, visitor);
- combinators.accept(visitor);
- safelyVisitChild(oldPrefix, visitor);
- }
-
- @Override
- public <R> R accept(ASTVisitor<R> visitor) {
- return visitor.visitImportDirective(this);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698