Skip to content

Commit

Permalink
minor (#523): Added missing parser tree walker in ast-generator.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna-Klatzer committed Jul 1, 2024
1 parent bfa6da2 commit ebf7e64
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
15 changes: 15 additions & 0 deletions kipper/core/src/compiler/ast/ast-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import type {
LogicalAndExpressionContext,
NumberPrimaryExpressionContext,
ObjectPrimaryExpressionContext,
ObjectPropertyContext,
OperatorModifiedUnaryExpressionContext,
ParameterDeclarationContext,
ParameterListContext,
Expand Down Expand Up @@ -377,6 +378,20 @@ export class KipperFileASTGenerator implements KipperParserListener, ParseTreeLi
*/
public exitObjectPrimaryExpression: (ctx: ObjectPrimaryExpressionContext) => void = this.handleExitingTreeNode;

/**
* Enter a parse tree produced by `KipperParser.objectProperty`.
* @param ctx The parse tree (instance of {@link KipperParserRuleContext}).
* @since 0.11.0
*/
public enterObjectProperty: (ctx: ObjectPropertyContext) => void = this.handleEnteringTreeNode;

/**
* Exit a parse tree produced by `KipperParser.objectProperty`.
* @param ctx The parse tree (instance of {@link KipperParserRuleContext}).
* @since 0.11.0
*/
public exitObjectProperty: (ctx: ObjectPropertyContext) => void = this.handleExitingTreeNode;

/**
* Enter a parse tree produced by `KipperParser.boolPrimaryExpression`.
* @param ctx The parse tree (instance of {@link KipperParserRuleContext}).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ export class ObjectProperty extends PrimaryExpression<ObjectPropertySemantics, O
* the children has already failed and as such no parent node should run type checking.
*/
public async primarySemanticAnalysis(): Promise<void> {
throw this.programCtx
.semanticCheck(this)
.notImplementedError(new KipperNotImplementedError("Object Properties have not been implemented yet."));
return; // For now, we don't have any semantic analysis for object properties.
}

/**
Expand All @@ -82,9 +80,7 @@ export class ObjectProperty extends PrimaryExpression<ObjectPropertySemantics, O
* @since 0.11.0
*/
public async primarySemanticTypeChecking(): Promise<void> {
throw this.programCtx
.semanticCheck(this)
.notImplementedError(new KipperNotImplementedError("Object Properties have not been implemented yet."));
return; // For now, we don't have any type checking for object properties.
}

/**
Expand Down

0 comments on commit ebf7e64

Please sign in to comment.