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

Unified Diff: dart/compiler/java/com/google/dart/compiler/parser/DartPrefixParser.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/parser/DartPrefixParser.java
diff --git a/dart/compiler/java/com/google/dart/compiler/parser/DartPrefixParser.java b/dart/compiler/java/com/google/dart/compiler/parser/DartPrefixParser.java
deleted file mode 100644
index 50686f97d55de28114f53b8b7ce7f8a3d7617073..0000000000000000000000000000000000000000
--- a/dart/compiler/java/com/google/dart/compiler/parser/DartPrefixParser.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2012 Dart project authors.
- *
- * Licensed under the Eclipse Public License v1.0 (the "License"); you may not use this file except
- * in compliance with the License. You may obtain a copy of the License at
- *
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.google.dart.compiler.parser;
-
-import com.google.dart.compiler.DartCompilerListener;
-import com.google.dart.compiler.Source;
-import com.google.dart.compiler.ast.DartIdentifier;
-import com.google.dart.compiler.ast.DartImportDirective;
-import com.google.dart.compiler.ast.DartStringLiteral;
-import com.google.dart.compiler.metrics.CompilerMetrics;
-
-import java.util.Set;
-
-/**
- * An extension of {@link DartParser} that updates the prefixes collection
- */
-public class DartPrefixParser extends DartParser {
-
- private final Set<String> prefixes;
-
- public DartPrefixParser(
- Source source,
- String sourceCode,
- boolean isDietParse,
- Set<String> prefixes,
- DartCompilerListener listener,
- CompilerMetrics compilerMetrics) {
- super(source, sourceCode, isDietParse, prefixes, listener, compilerMetrics);
- this.prefixes = prefixes;
- }
-
- @Override
- protected DartImportDirective parseImportDirective() {
- DartImportDirective directive = super.parseImportDirective();
- DartIdentifier prefix = directive.getPrefix();
- if (prefix != null) {
- prefixes.add(prefix.getName());
- }
- return directive;
- }
-
- @SuppressWarnings("deprecation")
- @Override
- protected DartImportDirective parseObsoleteImportDirective() {
- DartImportDirective directive = super.parseObsoleteImportDirective();
- DartStringLiteral oldPrefix = directive.getOldPrefix();
- if (oldPrefix != null) {
- prefixes.add(oldPrefix.getValue());
- }
- return directive;
- }
-}
-

Powered by Google App Engine
This is Rietveld 408576698