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

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

Issue 9633015: Map typeName getter to the global typeNameOf. This is a unspoken rule from the native interface :) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | « client/tests/client/client-leg.status ('k') | frog/leg/native_handler.dart » ('j') | no next file with comments »
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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 bool isGenerativeConstructor() => kind === ElementKind.GENERATIVE_CONSTRUCTOR; 63 bool isGenerativeConstructor() => kind === ElementKind.GENERATIVE_CONSTRUCTOR;
64 bool isCompilationUnit() { 64 bool isCompilationUnit() {
65 return kind === ElementKind.COMPILATION_UNIT || 65 return kind === ElementKind.COMPILATION_UNIT ||
66 kind === ElementKind.LIBRARY; 66 kind === ElementKind.LIBRARY;
67 } 67 }
68 bool isClass() => kind === ElementKind.CLASS; 68 bool isClass() => kind === ElementKind.CLASS;
69 bool isVariable() => kind === ElementKind.VARIABLE; 69 bool isVariable() => kind === ElementKind.VARIABLE;
70 bool isParameter() => kind === ElementKind.PARAMETER; 70 bool isParameter() => kind === ElementKind.PARAMETER;
71 bool isStatement() => kind === ElementKind.STATEMENT; 71 bool isStatement() => kind === ElementKind.STATEMENT;
72 bool isTypedef() => kind === ElementKind.TYPEDEF; 72 bool isTypedef() => kind === ElementKind.TYPEDEF;
73 bool isGetter() => kind === ElementKind.GETTER;
73 // TODO(ahe): Remove this method. 74 // TODO(ahe): Remove this method.
74 bool isClassOrInterfaceOrTypedef() { 75 bool isClassOrInterfaceOrTypedef() {
75 return kind == ElementKind.CLASS || kind == ElementKind.TYPEDEF; 76 return kind == ElementKind.CLASS || kind == ElementKind.TYPEDEF;
76 } 77 }
77 78
78 bool isAssignable() { 79 bool isAssignable() {
79 if (modifiers != null && modifiers.isFinal()) return false; 80 if (modifiers != null && modifiers.isFinal()) return false;
80 if (isFunction() || isGenerativeConstructor()) return false; 81 if (isFunction() || isGenerativeConstructor()) return false;
81 return true; 82 return true;
82 } 83 }
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 807
807 LabelElement addLabel(Identifier label, String labelName) { 808 LabelElement addLabel(Identifier label, String labelName) {
808 LabelElement result = new LabelElement(label, labelName, this, 809 LabelElement result = new LabelElement(label, labelName, this,
809 enclosingElement); 810 enclosingElement);
810 labels = labels.prepend(result); 811 labels = labels.prepend(result);
811 return result; 812 return result;
812 } 813 }
813 814
814 Node parseNode(DiagnosticListener l) => statement; 815 Node parseNode(DiagnosticListener l) => statement;
815 } 816 }
OLDNEW
« no previous file with comments | « client/tests/client/client-leg.status ('k') | frog/leg/native_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698