Class: ExpressionASTNodeFactory
compiler.ExpressionASTNodeFactory
Factory class which generates expression class instances using ExpressionASTNodeFactory.create().
Since
0.9.0
Hierarchy
ASTNodeFactory<Expression,ParserExpressionContext>↳
ExpressionASTNodeFactory
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new ExpressionASTNodeFactory()
Inherited from
Properties
ruleMapping
▪ Static Readonly ruleMapping: Object = ASTNodeMapper.expressionKindToClassMap
A mapping of AST node kind ids to their respective expression AST node classes.
Directly using expressionKindToClassMap.
Since
0.11.0
Type declaration
Defined in
kipper/core/src/compiler/ast/factories/expression-ast-factory.ts:23
Accessors
ruleIds
• get ruleIds(): ASTExpressionKind[]
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/expression-ast-factory.ts:37
ruleIds
• Static get ruleIds(): ASTExpressionKind[]
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/expression-ast-factory.ts:29
Methods
create
▸ create(antlrRuleCtx, parent): ConstructableASTExpression
Fetches the AST node class and creates a new instance based on the antlrRuleCtx.
Since
0.9.0
Parameters
| Name | Type | Description |
|---|---|---|
antlrRuleCtx |
ParserExpressionContext |
The context instance that the handler class should be fetched for. |
parent |
CompilableASTNode<SemanticData, TypeData> |
The parent of the AST node that is being created. |
Returns
Overrides
Defined in
kipper/core/src/compiler/ast/factories/expression-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