Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Typescript definition files to export Trees module. #4718

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions runtime/JavaScript/src/antlr4/tree/Trees.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Parser } from "../Parser";
import { ParseTree } from "./ParseTree";
import { Tree } from "./Tree";

export default Trees;
declare namespace Trees {
function toStringTree(tree: Tree, ruleNames: string[], recog: Parser): string;
function getNodeText(t: Tree, ruleNames: string[], recog: Parser): string;
function getChildren(t: Tree): Tree[];
function getAncestors(t: Tree): Tree[];
function findAllTokenNodes(t: ParseTree, ttype: number): ParseTree[];
function findAllRuleNodes(t: ParseTree, ruleIndex: number): ParseTree[];
function findAllNodes(t: ParseTree, index: number, findTokens: boolean): ParseTree[];
function descendants(t: ParseTree): ParseTree[];
}
2 changes: 1 addition & 1 deletion runtime/JavaScript/src/antlr4/tree/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export * from './ParseTree';
export * from './ParseTreeListener';
export * from './ParseTreeVisitor';
export * from './ParseTreeWalker';

export * as Trees from './Trees';
Loading