useDeclaringConstructorsAst top-level property

  1. @experimental
bool useDeclaringConstructorsAst
getter/setter pair

Controls how AST represents nodes related to the declaring constructors language feature.

Must be set before any interaction with the analyzer, specifically before parsing any code. Must not be changed after that.

For ClassDeclaration, when true:

  1. ClassDeclaration.namePart can be used.
  2. ClassDeclaration.name throws UnsupportedError.
  3. ClassDeclaration.typeParameters throws UnsupportedError.
  4. ClassDeclaration.body can be used.
  5. ClassDeclaration.members throws UnsupportedError.
  6. ClassDeclaration.childEntities returns namePart and body, and does not return name, typeParameters, or members entities.
  7. ClassDeclaration.visitChildren visits namePart and body, and does not visit typeParameters or members.

For EnumDeclaration, when true:

  1. EnumDeclaration.namePart can be used.
  2. EnumDeclaration.name throws UnsupportedError.
  3. EnumDeclaration.typeParameters throws UnsupportedError.
  4. EnumDeclaration.childEntities returns namePart, and does not return name or typeParameters entities.
  5. EnumDeclaration.visitChildren visits namePart, and does not visit typeParameters.

For ExtensionTypeDeclaration, when true:

  1. ExtensionTypeDeclaration.namePart can be used.
  2. ExtensionTypeDeclaration.name throws UnsupportedError.
  3. ExtensionTypeDeclaration.typeParameters throws UnsupportedError.
  4. ExtensionTypeDeclaration.representation throws UnsupportedError.
  5. ExtensionTypeDeclaration.body can be used.
  6. ExtensionTypeDeclaration.members throws UnsupportedError.
  7. ExtensionTypeDeclaration.childEntities returns namePart and body, and does not return name, typeParameters, representation, or members entities.
  8. ExtensionTypeDeclaration.visitChildren visits namePart and body, and does not visit typeParameters, representation, or members.

Implementation

@experimental
bool useDeclaringConstructorsAst = false;