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

Unified Diff: lib/src/analyzer.dart

Issue 11275029: Support for specifying an output directory (issue #106) (Closed) Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 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
« no previous file with comments | « no previous file | lib/src/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/analyzer.dart
diff --git a/lib/src/analyzer.dart b/lib/src/analyzer.dart
index a1897a84a88097aa7270d7a4f52a79f231f3a411..bcc28a51f7e8c2136c7785ecc4195e7ca221ed9c 100644
--- a/lib/src/analyzer.dart
+++ b/lib/src/analyzer.dart
@@ -12,6 +12,7 @@ import 'dart:coreimpl';
import 'package:html5lib/dom.dart';
import 'package:html5lib/dom_parsing.dart';
+import 'directive_parser.dart' show parseDartCode;
import 'file_system/path.dart';
import 'files.dart';
import 'info.dart';
@@ -473,6 +474,12 @@ class _ElementLoader extends TreeVisitor {
'file.', node.span, file: _fileInfo.path);
} else {
_currentInfo.inlinedCode = text.value;
+ _currentInfo.userCode = parseDartCode(text.value,
+ _currentInfo.inputPath, messages);
+ if (_currentInfo.userCode.partOf != null) {
+ messages.error('expected a library, not a part.',
+ node.span, file: _fileInfo.path);
+ }
}
}
@@ -520,6 +527,7 @@ void _attachExtenalScript(LibraryInfo info, Map<Path, FileInfo> files) {
var path = info.externalFile;
if (path != null) {
info.externalCode = files[path];
+ info.userCode = info.externalCode.userCode;
}
}
« no previous file with comments | « no previous file | lib/src/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698