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

Unified Diff: lib/compiler/implementation/scanner/listener.dart

Issue 10824275: Revert "Refactor Library/CompilationUnit and how we define local Scope." (Closed) Base URL: https://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: lib/compiler/implementation/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 01d642b84b85e67798db609f176453af8ea1bc28..576512f901c74a2f890dff423f9236a1fbbc345a 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -556,14 +556,10 @@ class ElementListener extends Listener {
}
StringNode firstArgument = popLiteralString();
Identifier tag = popNode();
- LibraryElement library = compilationUnitElement.getLibrary();
- if (library.entryCompilationUnit != compilationUnitElement) {
- // Only allow script tags in the entry compilation unit.
- listener.cancel("script tags not allowed here", node: tag);
- }
- ScriptTag scriptTag = new ScriptTag(tag, firstArgument, argumentName,
- prefix, beginToken, endToken);
- library.addTag(scriptTag, listener);
+ compilationUnitElement.addTag(new ScriptTag(tag, firstArgument,
+ argumentName, prefix,
+ beginToken, endToken),
+ listener);
}
void endClassDeclaration(int interfacesCount, Token beginToken,
« no previous file with comments | « lib/compiler/implementation/scanner/class_element_parser.dart ('k') | lib/compiler/implementation/scanner/scanner_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698