| 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;
|
| }
|
| }
|
|
|
|
|