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

Unified Diff: lib/devc.dart

Issue 983553002: Allow changing a file from a part to a library. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | lib/src/codegen/html_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/devc.dart
diff --git a/lib/devc.dart b/lib/devc.dart
index 61704b02c701f19ed1ededa4ac17dc5f4857aac2..f2f548e0fdbbdf514074618643367c9c83d9a536 100644
--- a/lib/devc.dart
+++ b/lib/devc.dart
@@ -97,7 +97,7 @@ class Compiler {
bool _buildSource(SourceNode node) {
if (node is HtmlSourceNode) {
_buildHtmlFile(node);
- } else if (node is LibrarySourceNode) {
+ } else if (node is DartSourceNode) {
_buildDartLibrary(node);
} else {
assert(false); // should not get a build request on PartSourceNode
@@ -134,12 +134,12 @@ class Compiler {
_devCompilerRuntimeCopied = true;
}
- bool _isEntry(LibrarySourceNode node) {
- if (_entryNode is LibrarySourceNode) return _entryNode == node;
+ bool _isEntry(DartSourceNode node) {
+ if (_entryNode is DartSourceNode) return _entryNode == node;
return (_entryNode as HtmlSourceNode).scripts.contains(node);
}
- void _buildDartLibrary(LibrarySourceNode node) {
+ void _buildDartLibrary(DartSourceNode node) {
var source = node.source;
// TODO(sigmund): find out from analyzer team if there is a better way
_resolver.context.applyChanges(new ChangeSet()..changedSource(source));
« no previous file with comments | « no previous file | lib/src/codegen/html_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698