-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Typescript definition files to export Trees module. (#4718)
Signed-off-by: Lawrence Zeng <[email protected]>
- Loading branch information
1 parent
75befab
commit c251d2d
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters