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

Side by Side Diff: pkg/compiler/lib/src/elements/entities.dart

Issue 2464103002: Introduce ClassLike, MemberLike, FieldLike and FunctionLike (Closed)
Patch Set: Updated cf. comments. Created 4 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
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
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.
4
5 library entities;
6
7 import 'elements.dart' show Entity;
8
9 /// Stripped down super interface for class like entities.
10 ///
11 /// Currently only [ClassElement] but later also kernel based Dart classes
12 /// and/or Dart-in-JS classes.
13 abstract class ClassEntity extends Entity {
14 bool get isClosure;
15 void forEachInstanceField(f(ClassEntity cls, FieldEntity field),
16 {bool includeSuperAndInjectedMembers: false});
17 }
18
19 /// Stripped down super interface for member like entities, that is,
20 /// constructors, methods, fields etc.
21 ///
22 /// Currently only [MemberElement] but later also kernel based Dart members
23 /// and/or Dart-in-JS properties.
24 abstract class MemberEntity extends Entity {
25 bool get isField;
26 bool get isFunction;
27 bool get isGetter;
28 bool get isAssignable;
29 ClassEntity get enclosingClass;
30 }
31
32 /// Stripped down super interface for field like entities.
33 ///
34 /// Currently only [FieldElement] but later also kernel based Dart fields
35 /// and/or Dart-in-JS field-like properties.
36 abstract class FieldEntity extends MemberEntity {}
37
38 /// Stripped down super interface for function like entities.
39 ///
40 /// Currently only [FieldElement] but later also kernel based Dart constructors
41 /// and methods and/or Dart-in-JS function-like properties.
42 abstract class FunctionEntity extends MemberEntity {}
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698