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

Side by Side Diff: dart/frog/leg/elements/elements.dart

Issue 9568008: Do not allow native syntax on all libraries. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/frog/leg/native_handler.dart » ('j') | dart/frog/leg/native_handler.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/native_handler.dart » ('j') | dart/frog/leg/native_handler.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698