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

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

Issue 8924001: First implementation of top-level fields without initializers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 | frog/leg/scanner/listener.dart » ('j') | frog/leg/scanner/listener.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 12 matching lines...) Expand all
23 final String id; 23 final String id;
24 24
25 const ElementKind(String this.id); 25 const ElementKind(String this.id);
26 26
27 static final ElementKind VARIABLE = const ElementKind('variable'); 27 static final ElementKind VARIABLE = const ElementKind('variable');
28 static final ElementKind PARAMETER = const ElementKind('parameter'); 28 static final ElementKind PARAMETER = const ElementKind('parameter');
29 static final ElementKind FUNCTION = const ElementKind('function'); 29 static final ElementKind FUNCTION = const ElementKind('function');
30 static final ElementKind CLASS = const ElementKind('class'); 30 static final ElementKind CLASS = const ElementKind('class');
31 static final ElementKind FOREIGN = const ElementKind('foreign'); 31 static final ElementKind FOREIGN = const ElementKind('foreign');
32 static final ElementKind CONSTRUCTOR = const ElementKind('constructor'); 32 static final ElementKind CONSTRUCTOR = const ElementKind('constructor');
33 static final ElementKind FIELD = const ElementKind('field');
34 static final ElementKind VARIABLE_LIST = const ElementKind('variable_list');
karlklose 2011/12/12 15:09:48 VARIABLE_LIST -> FIELD_LIST?
ngeoffray 2011/12/12 15:52:08 Done.
33 static final ElementKind CONSTRUCTOR_BODY = 35 static final ElementKind CONSTRUCTOR_BODY =
34 const ElementKind('constructor_body'); 36 const ElementKind('constructor_body');
35 37
36 toString() => id; 38 toString() => id;
37 } 39 }
38 40
39 class Element implements Hashable { 41 class Element implements Hashable {
40 final SourceString name; 42 final SourceString name;
41 final ElementKind kind; 43 final ElementKind kind;
42 final Element enclosingElement; 44 final Element enclosingElement;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // TODO(ngeoffray): Implement these. 232 // TODO(ngeoffray): Implement these.
231 bool canHaveDefaultConstructor() => true; 233 bool canHaveDefaultConstructor() => true;
232 234
233 SynthesizedConstructorElement getSynthesizedConstructor() { 235 SynthesizedConstructorElement getSynthesizedConstructor() {
234 if (synthesizedConstructor === null && canHaveDefaultConstructor()) { 236 if (synthesizedConstructor === null && canHaveDefaultConstructor()) {
235 synthesizedConstructor = new SynthesizedConstructorElement(this); 237 synthesizedConstructor = new SynthesizedConstructorElement(this);
236 } 238 }
237 return synthesizedConstructor; 239 return synthesizedConstructor;
238 } 240 }
239 } 241 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/scanner/listener.dart » ('j') | frog/leg/scanner/listener.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698