| Index: frog/leg/elements/elements.dart
|
| diff --git a/frog/leg/elements/elements.dart b/frog/leg/elements/elements.dart
|
| index c7d7d39ccda1ab5b580b83ecbab20afb20eff82c..2a6eeeec3049886d27245d1b61ee468631293a47 100644
|
| --- a/frog/leg/elements/elements.dart
|
| +++ b/frog/leg/elements/elements.dart
|
| @@ -46,6 +46,10 @@ class ElementKind {
|
| const ElementKind('variable', ElementCategory.VARIABLE);
|
| static final ElementKind PARAMETER =
|
| const ElementKind('parameter', ElementCategory.VARIABLE);
|
| + // Parameters in constructors that directly initialize fields. For example:
|
| + // [:A(this.field):].
|
| + static final ElementKind FIELD_PARAMETER =
|
| + const ElementKind('field_parameter', ElementCategory.VARIABLE);
|
| static final ElementKind FUNCTION =
|
| const ElementKind('function', ElementCategory.FUNCTION);
|
| static final ElementKind CLASS =
|
| @@ -351,6 +355,21 @@ class VariableElement extends Element {
|
| Token position() => findMyName(variables.position());
|
| }
|
|
|
| +/**
|
| + * Parameters in constructors that directly initialize fields. For example:
|
| + * [:A(this.field):].
|
| + */
|
| +class FieldParameterElement extends VariableElement {
|
| + VariableElement fieldElement;
|
| +
|
| + FieldParameterElement(SourceString name,
|
| + this.fieldElement,
|
| + VariableListElement variables,
|
| + Element enclosing,
|
| + Node node)
|
| + : super(name, variables, ElementKind.FIELD_PARAMETER, enclosing, node);
|
| +}
|
| +
|
| // This element represents a list of variable or field declaration.
|
| // It contains the node, and the type. A [VariableElement] always
|
| // references its [VariableListElement]. It forwards its
|
|
|