| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #library('elements'); | 5 #library('elements'); |
| 6 | 6 |
| 7 #import('../tree/tree.dart'); | 7 #import('../tree/tree.dart'); |
| 8 #import('../scanner/scannerlib.dart'); | 8 #import('../scanner/scannerlib.dart'); |
| 9 #import('../leg.dart'); // TODO(karlklose): we only need type. | 9 #import('../leg.dart'); // TODO(karlklose): we only need type. |
| 10 #import('../util/util.dart'); | 10 #import('../util/util.dart'); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 class LibraryElement extends CompilationUnitElement { | 142 class LibraryElement extends CompilationUnitElement { |
| 143 // TODO(ahe): Library element should not be a subclass of | 143 // TODO(ahe): Library element should not be a subclass of |
| 144 // CompilationUnitElement. | 144 // CompilationUnitElement. |
| 145 | 145 |
| 146 Link<CompilationUnitElement> compilationUnits = | 146 Link<CompilationUnitElement> compilationUnits = |
| 147 const EmptyLink<CompilationUnitElement>(); | 147 const EmptyLink<CompilationUnitElement>(); |
| 148 Link<ScriptTag> tags = const EmptyLink<ScriptTag>(); | 148 Link<ScriptTag> tags = const EmptyLink<ScriptTag>(); |
| 149 ScriptTag libraryTag; | 149 ScriptTag libraryTag; |
| 150 Map<SourceString, Element> elements; | 150 Map<SourceString, Element> elements; |
| 151 bool canUseNative = false; |
| 151 | 152 |
| 152 LibraryElement(Script script) | 153 LibraryElement(Script script) |
| 153 : elements = new Map<SourceString, Element>(), | 154 : elements = new Map<SourceString, Element>(), |
| 154 super.library(script); | 155 super.library(script); |
| 155 | 156 |
| 156 void addCompilationUnit(CompilationUnitElement element) { | 157 void addCompilationUnit(CompilationUnitElement element) { |
| 157 compilationUnits = compilationUnits.prepend(element); | 158 compilationUnits = compilationUnits.prepend(element); |
| 158 } | 159 } |
| 159 | 160 |
| 160 void addTag(ScriptTag tag, DiagnosticListener listener) { | 161 void addTag(ScriptTag tag, DiagnosticListener listener) { |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 | 784 |
| 784 LabelElement addLabel(Identifier label, String labelName) { | 785 LabelElement addLabel(Identifier label, String labelName) { |
| 785 LabelElement result = new LabelElement(label, labelName, this, | 786 LabelElement result = new LabelElement(label, labelName, this, |
| 786 enclosingElement); | 787 enclosingElement); |
| 787 labels = labels.prepend(result); | 788 labels = labels.prepend(result); |
| 788 return result; | 789 return result; |
| 789 } | 790 } |
| 790 | 791 |
| 791 Node parseNode(DiagnosticListener l) => statement; | 792 Node parseNode(DiagnosticListener l) => statement; |
| 792 } | 793 } |
| OLD | NEW |