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

Side by Side Diff: lib/src/info.dart

Issue 1235503010: fixes #219, able to compile multiple entry points (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Defines static information collected by the type checker and used later by 5 /// Defines static information collected by the type checker and used later by
6 /// emitters to generate code. 6 /// emitters to generate code.
7 library dev_compiler.src.info; 7 library dev_compiler.src.info;
8 8
9 import 'package:analyzer/src/generated/ast.dart'; 9 import 'package:analyzer/src/generated/ast.dart';
10 import 'package:analyzer/src/generated/element.dart'; 10 import 'package:analyzer/src/generated/element.dart';
(...skipping 12 matching lines...) Expand all
23 CheckerResults(this.libraries, this.rules, this.failure); 23 CheckerResults(this.libraries, this.rules, this.failure);
24 } 24 }
25 25
26 /// Computed information about each library. 26 /// Computed information about each library.
27 class LibraryInfo { 27 class LibraryInfo {
28 /// Canonical name of the library. This is unfortunately not derived from the 28 /// Canonical name of the library. This is unfortunately not derived from the
29 /// library directive as it doesn't have any meaningful rules enforced. 29 /// library directive as it doesn't have any meaningful rules enforced.
30 /// Instead, this is inferred from the path to the file defining the library. 30 /// Instead, this is inferred from the path to the file defining the library.
31 final String name; 31 final String name;
32 32
33 /// Whether this is the entry library that contains `main`.
34 final bool isEntry;
35
36 /// Corresponding analyzer element. 33 /// Corresponding analyzer element.
37 final LibraryElement library; 34 final LibraryElement library;
38 35
39 LibraryInfo(library, this.isEntry) 36 LibraryInfo(library)
40 : library = library, 37 : library = library,
41 name = utils.canonicalLibraryName(library); 38 name = utils.canonicalLibraryName(library);
42 } 39 }
43 40
44 class LibraryUnit { 41 class LibraryUnit {
45 final CompilationUnit library; 42 final CompilationUnit library;
46 final List<CompilationUnit> parts; 43 final List<CompilationUnit> parts;
47 44
48 LibraryUnit(this.library, this.parts); 45 LibraryUnit(this.library, this.parts);
49 46
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 /// Better to have `super` at the end, as required by the Dart style guide: 534 /// Better to have `super` at the end, as required by the Dart style guide:
538 /// <http://goo.gl/q1T4BB> 535 /// <http://goo.gl/q1T4BB>
539 /// 536 ///
540 /// For now this is the only pattern we support. 537 /// For now this is the only pattern we support.
541 class InvalidSuperInvocation extends StaticError { 538 class InvalidSuperInvocation extends StaticError {
542 InvalidSuperInvocation(SuperConstructorInvocation node) : super(node); 539 InvalidSuperInvocation(SuperConstructorInvocation node) : super(node);
543 540
544 @override String get message => "super call must be last in an initializer " 541 @override String get message => "super call must be last in an initializer "
545 "list (see http://goo.gl/q1T4BB): {0}"; 542 "list (see http://goo.gl/q1T4BB): {0}";
546 } 543 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698