Class: DeclarationASTNodeFactory
compiler.DeclarationASTNodeFactory
Factory class which generates definition class instances using DefinitionASTNodeFactory.create().
Since
0.9.0
Hierarchy
ASTNodeFactory
<Declaration
,ParserExpressionContext
>↳
DeclarationASTNodeFactory
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new DeclarationASTNodeFactory()
Inherited from
Properties
ruleMapping
▪ Static
Readonly
ruleMapping: Object
= ASTNodeMapper.declarationKindToClassMap
A mapping of AST node kind ids to their respective declaration AST node classes.
Directly using declarationKindToClassMap.
Since
0.11.0
Type declaration
Name | Type |
---|---|
13 |
typeof ParameterDeclaration |
6 |
typeof FunctionDeclaration |
7 |
typeof VariableDeclaration |
Defined in
kipper/core/src/compiler/ast/factories/declaration-ast-factory.ts:23
Accessors
ruleIds
• get
ruleIds(): ASTDeclarationKind
[]
Returns an array of all AST node kind ids that this factory can process.
Since
0.10.0
Returns
Defined in
kipper/core/src/compiler/ast/factories/declaration-ast-factory.ts:37
ruleIds
• Static
get
ruleIds(): ASTDeclarationKind
[]
Returns an array of all AST node kind ids that this factory can process.
Since
0.10.0
Returns
Defined in
kipper/core/src/compiler/ast/factories/declaration-ast-factory.ts:29
Methods
create
▸ create(antlrRuleCtx
, parent
): ConstructableASTDeclaration
Fetches the AST node and creates a new instance based on the antlrRuleCtx.
Since
0.9.0
Parameters
Name | Type | Description |
---|---|---|
antlrRuleCtx |
ParserDeclarationContext |
The context instance that the handler class should be fetched for. |
parent |
CompilableNodeParent |
The parent of the AST node that is being created. |
Returns
Overrides
Defined in
kipper/core/src/compiler/ast/factories/declaration-ast-factory.ts:47
getRuleIds
▸ Static
Protected
getRuleIds(ruleMapping
): ConstructableASTKind
[]
Returns an array of all AST node kind ids that this factory can process.
Since
0.10.0
Parameters
Name | Type |
---|---|
ruleMapping |
Record <number , ConstructableASTNodeClass > |
Returns
Inherited from
Defined in
kipper/core/src/compiler/ast/factories/ast-node-factory.ts:22