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

Side by Side Diff: pkg/analyzer2dart/lib/src/element_converter.dart

Issue 701123002: Support local functions in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment Created 6 years, 1 month 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 | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/analyzer2dart/lib/src/modely.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /// Convertion of elements between the analyzer element model and the dart2js 5 /// Convertion of elements between the analyzer element model and the dart2js
6 /// element model. 6 /// element model.
7 7
8 library analyzer2dart.element_converter; 8 library analyzer2dart.element_converter;
9 9
10 import 'package:compiler/src/elements/elements.dart' as dart2js; 10 import 'package:compiler/src/elements/elements.dart' as dart2js;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 106
107 ElementConverterVisitor(this.converter); 107 ElementConverterVisitor(this.converter);
108 108
109 @override 109 @override
110 dart2js.LibraryElement visitLibraryElement(analyzer.LibraryElement input) { 110 dart2js.LibraryElement visitLibraryElement(analyzer.LibraryElement input) {
111 return new LibraryElementY(converter, input); 111 return new LibraryElementY(converter, input);
112 } 112 }
113 113
114 @override 114 @override
115 dart2js.FunctionElement visitFunctionElement(analyzer.FunctionElement input) { 115 dart2js.FunctionElement visitFunctionElement(analyzer.FunctionElement input) {
116 return new TopLevelFunctionElementY(converter, input); 116 if (input.isStatic) {
117 return new TopLevelFunctionElementY(converter, input);
118 } else {
119 return new LocalFunctionElementY(converter, input);
120 }
117 } 121 }
118 122
119 @override 123 @override
120 dart2js.ParameterElement visitParameterElement( 124 dart2js.ParameterElement visitParameterElement(
121 analyzer.ParameterElement input) { 125 analyzer.ParameterElement input) {
122 return new ParameterElementY(converter, input); 126 return new ParameterElementY(converter, input);
123 } 127 }
124 128
125 @override 129 @override
126 dart2js.ClassElement visitClassElement(analyzer.ClassElement input) { 130 dart2js.ClassElement visitClassElement(analyzer.ClassElement input) {
(...skipping 26 matching lines...) Expand all
153 analyzer.LocalVariableElement input) { 157 analyzer.LocalVariableElement input) {
154 return new LocalVariableElementY(converter, input); 158 return new LocalVariableElementY(converter, input);
155 } 159 }
156 160
157 @override 161 @override
158 dart2js.ConstructorElement visitConstructorElement( 162 dart2js.ConstructorElement visitConstructorElement(
159 analyzer.ConstructorElement input) { 163 analyzer.ConstructorElement input) {
160 return new ConstructorElementY(converter, input); 164 return new ConstructorElementY(converter, input);
161 } 165 }
162 } 166 }
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/analyzer2dart/lib/src/modely.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698