ASTRoot class

An AST Root.

A parse of a CodeUnit generates an ASTRoot.

Inheritance

Constructors

ASTRoot()

Properties

children Iterable<ASTNode>
The children nodes of this node.
no setterinherited
classes List<ASTClassNormal>
no setter
classesNames List<String>
no setter
descendantChildren List<ASTNode>
Return the children and it's descendant children (unmodifiable).
no setterinherited
exportedSymbolNames Set<String>
The set of top-level symbol names visible to importers of this module.
no setter
exports Set<ASTStatementExport>
no setter
extensions List<ASTExtension>
The extensions declared by this module, in declaration order.
no setter
functions List<ASTFunctionSet>
no setterinherited
functionsNames List<String>
no setterinherited
getter List<ASTGetterDeclaration>
no setterinherited
getterNames List<String>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
imports Set<ASTStatementImport>
no setter
importScope ImportScope?
The resolved import scope for this module (imported symbols, prefixes). Set by the module resolver before execution; consulted by getNodeIdentifier and getFunction before the greedy fallback.
getter/setter pair
moduleId String?
The module identifier (usually the CodeUnit.id) this root was loaded as. Set by the resolver; used to key the module in the dependency graph/cache.
getter/setter pair
namespace String
getter/setter pair
parentBlock ASTBlock?
getter/setter pairinherited
parentNode ASTNode?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statements List<ASTStatement>
no setterinherited
typeAliases List<ASTTypeAlias>
no setter

Methods

addAllClasses(List<ASTClassNormal> classes) → void
addAllFunctions(Iterable<ASTFunctionDeclaration> fs) → void
inherited
addAllGetters(Iterable<ASTGetterDeclaration> gs) → void
inherited
addAllStatements(Iterable<ASTStatement> statements) → void
inherited
addClass(ASTClassNormal clazz) → void
addExport(ASTStatementExport export) → void
addExtension(ASTExtension extension) → void
addFunction(ASTFunctionDeclaration f) → void
inherited
addGetter(ASTGetterDeclaration g) → void
inherited
addImport(ASTStatementImport import) → void
addStatement(ASTStatement statement) → void
inherited
addTypeAlias(ASTTypeAlias typeAlias) → void
associateToType(ASTTypedNode node) → void
inherited
cacheDescendantChildren() → void
Mark that this node can cache its descendantChildren.
inherited
containsClass(String className, {bool caseInsensitive = false}) bool
containsFunctionWithName(String name, {bool caseInsensitive = false}) bool
inherited
createContext(VMTypeResolver? typeResolver) VMContext
inherited
defineRunContext(VMContext parentContext) VMContext
inherited
execute(String entryFunctionName, List? positionalParameters, Map? namedParameters, {ApolloImportManager? importManager, ApolloExternalFunctionMapper? externalFunctionMapper, VMObject? classInstanceObject, Map<String, ASTValue>? classInstanceFields, VMTypeResolver? typeResolver}) FutureOr<ASTValue>
inherited
exportNamesNotDeclared() Set<String>
Own top-level symbol names that are NOT declared (used by the resolver to flag invalid exports).
getClass(String className, {bool caseInsensitive = false}) ASTClassNormal?
getClassWithMethod(String methodName) ASTClassNormal?
getExtensionFunction(ASTClass receiver, String name, ASTFunctionSignature parametersSignature) ASTInvocableDeclaration<dynamic, ASTParameterDeclaration, ASTParametersDeclaration<ASTParameterDeclaration>>?
Resolves an extension method name for a receiver of class receiver.
getExtensionGetter(ASTClass receiver, String name) ASTGetterDeclaration?
Resolves an extension getter name for a receiver of class receiver. See getExtensionFunction.
getField(String name, {bool caseInsensitive = false}) ASTClassField?
inherited
getFunction(String fName, ASTFunctionSignature parametersSignature, VMContext context, {bool caseInsensitive = false}) ASTInvocableDeclaration<dynamic, ASTParameterDeclaration, ASTParametersDeclaration<ASTParameterDeclaration>>?
override
getFunctionReturnType<T>(String name, ASTFunctionSignature parametersTypes, VMContext context) ASTType<T>?
inherited
getFunctionWithName(String name, {bool caseInsensitive = false}) ASTFunctionSet?
inherited
getFunctionWithParameters(String entryFunctionName, List? positionalParameters, Map? namedParameters, {ApolloImportManager? importManager, ApolloExternalFunctionMapper? externalFunctionMapper, VMTypeResolver? typeResolver}) FutureOr<ASTInvocableDeclaration<dynamic, ASTParameterDeclaration, ASTParametersDeclaration<ASTParameterDeclaration>>?>
inherited
getGetter(String fName, VMContext context, {bool caseInsensitive = false}) ASTGetterDeclaration?
inherited
getGetterWithName(String name, {bool caseInsensitive = false}) ASTGetterDeclaration?
inherited
getNodeIdentifier(String name, {ASTNode? requester}) ASTNode?
override
getTypeAlias(String name) ASTTypeAlias?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveNode(ASTNode? parentNode) → void
override
resolveRuntimeType(VMContext context, ASTNode? node) FutureOr<ASTType>
inherited
resolveType(VMContext? context) ASTType
inherited
run(VMContext parentContext, ASTRunStatus runStatus) FutureOr<ASTValue>
override
set(ASTBlock? other) → void
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited