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

Unified Diff: compiler/java/com/google/dart/compiler/parser/DartParser.java

Issue 8229028: Don't allow a #source directive in a library unit include itself (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor cleanup from previous, removed some debugging code Created 9 years, 2 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/parser/DartParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index d2e2445de805dbf97bb2e56563fe254f5f60ac7b..3e414d016fbdf91d61a53fa595d21320ba9d6947 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -299,24 +299,28 @@ public class DartParser extends CompletionHooksParserBase {
} else {
importPath = new LibraryNode(importDirective.getLibraryUri().getValue());
}
+ importPath.setSourceInfo(importDirective.getSourceInfo());
libUnit.addImportPath(importPath);
}
while (peek(0) == Token.SOURCE) {
beginSourceDirective();
DartSourceDirective sourceDirective = done(parseSourceDirective());
LibraryNode sourcePath = new LibraryNode(sourceDirective.getSourceUri().getValue());
+ sourcePath.setSourceInfo(sourceDirective.getSourceInfo());
libUnit.addSourcePath(sourcePath);
}
while (peek(0) == Token.RESOURCE) {
beginResourceDirective();
DartResourceDirective resourceDirective = done(parseResourceDirective());
LibraryNode resourcePath = new LibraryNode(resourceDirective.getResourceUri().getValue());
+ resourcePath.setSourceInfo(resourceDirective.getSourceInfo());
libUnit.addResourcePath(resourcePath);
}
while (peek(0) == Token.NATIVE) {
beginNativeDirective();
DartNativeDirective nativeDirective = done(parseNativeDirective());
LibraryNode nativePath = new LibraryNode(nativeDirective.getNativeUri().getValue());
+ nativePath.setSourceInfo(nativeDirective.getSourceInfo());
libUnit.addNativePath(nativePath);
}
« no previous file with comments | « compiler/java/com/google/dart/compiler/ast/DartUnit.java ('k') | tests/language/src/SourceSelfNegativeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698