Skip to content

Commit

Permalink
Merge pull request #15 from AleiynikovPavel/master
Browse files Browse the repository at this point in the history
fix: fixed getChild method of ParserRuleContext class
  • Loading branch information
mike-lischke authored Dec 14, 2023
2 parents 243bffc + 6ed10a3 commit b4a5f9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ParserRuleContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ export class ParserRuleContext extends RuleContext {

public override getChild(i: number): RuleContext | null;
public override getChild<T extends ParseTree>(i: number,
type: new (parent: ParserRuleContext | null, invokingStateNumber: number) => T): T | null;
type: new (...args: unknown[]) => T): T | null;
public override getChild<T extends ParseTree>(i: number,
type?: new (parent: ParserRuleContext | null, invokingStateNumber: number) => T): T | null {
type?: new (...args: unknown[]) => T): T | null {
if (this.children === null || i < 0 || i >= this.children.length) {
return null;
}
Expand Down

0 comments on commit b4a5f9f

Please sign in to comment.