-
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. Signed-off-by: Lawrence Zeng <[email protected]>
- Loading branch information
1 parent
933c4e0
commit 7ceb3bb
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