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

Side by Side Diff: pkg/compiler/lib/src/parser/partial_elements.dart

Issue 1417103002: Add ElementKind for factory constructors. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.parser.partial_elements; 5 library dart2js.parser.partial_elements;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/resolution.dart' show 8 import '../common/resolution.dart' show
9 Parsing, 9 Parsing,
10 Resolution; 10 Resolution;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 reusePartialFunctionMixin(); 230 reusePartialFunctionMixin();
231 } 231 }
232 232
233 PartialSetterElement copyWithEnclosing(Element enclosing) { 233 PartialSetterElement copyWithEnclosing(Element enclosing) {
234 return new PartialSetterElement( 234 return new PartialSetterElement(
235 name, beginToken, getOrSet, endToken, modifiers, enclosing, 235 name, beginToken, getOrSet, endToken, modifiers, enclosing,
236 hasBody: hasBody); 236 hasBody: hasBody);
237 } 237 }
238 } 238 }
239 239
240 // TODO(johnniwinther): Create [PartialGenerativeConstructor] and
241 // [PartialFactoryConstructor] subclasses and make this abstract.
240 class PartialConstructorElement extends ConstructorElementX 242 class PartialConstructorElement extends ConstructorElementX
241 with PartialElement, PartialFunctionMixin { 243 with PartialElement, PartialFunctionMixin {
242 PartialConstructorElement(String name, 244 PartialConstructorElement(String name,
243 Token beginToken, 245 Token beginToken,
244 Token endToken, 246 Token endToken,
245 ElementKind kind, 247 ElementKind kind,
246 Modifiers modifiers, 248 Modifiers modifiers,
247 Element enclosing) 249 Element enclosing)
248 : super(name, kind, modifiers, enclosing) { 250 : super(name, kind, modifiers, enclosing) {
249 init(beginToken, null, endToken); 251 init(beginToken, null, endToken);
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 } on ParserError catch (e) { 491 } on ParserError catch (e) {
490 partial.hasParseError = true; 492 partial.hasParseError = true;
491 return new ErrorNode(element.position, e.reason); 493 return new ErrorNode(element.position, e.reason);
492 } 494 }
493 Node node = listener.popNode(); 495 Node node = listener.popNode();
494 assert(listener.nodes.isEmpty); 496 assert(listener.nodes.isEmpty);
495 return node; 497 return node;
496 }); 498 });
497 }); 499 });
498 } 500 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/parser/member_listener.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698