Class BindingTable
Package: grammarkdown
Properties
globals
Declaration
readonly globals: SymbolTable;
Property Value
isEmpty
Gets a value indicating whether this BindingTable is empty.
Declaration
get isEmpty(): boolean;
Property Value
Methods
getAncestor(node, kind)
Gets the nearest ancestor of node with the provided kind.
Declaration
getAncestor(node: Node | undefined, kind: SyntaxKind): Node | undefined;
Parameters
- node
- Node | undefined
- kind
- SyntaxKind
Returns
getDeclarations(symbol)
Gets the declarations for the provided symbol.
Declaration
getDeclarations(symbol: Symbol | undefined): (SourceFile | Production | Parameter)[];
Parameters
- symbol
- Symbol | undefined
Returns
getParent(node)
Gets the parent of the provided Node.
Declaration
getParent(node: Node | undefined): Node | undefined;
Parameters
- node
- Node | undefined
Returns
getReferences(symbol)
Gets the references to the provided symbol.
Declaration
getReferences(symbol: Symbol | undefined): Node[];
Parameters
- symbol
- Symbol | undefined
Returns
getSourceFile(node)
Gets the SourceFile containing node.
Declaration
getSourceFile(node: Node | undefined): SourceFile | undefined;
Parameters
- node
- Node | undefined
Returns
getSymbol(node)
Gets the Symbol bound to node.
Declaration
getSymbol(node: Node | undefined): Symbol | undefined;
Parameters
- node
- Node | undefined
Returns
hasParent(node)
Returns whether the provided Node has a parent.
Declaration
hasParent(node: Node | undefined): boolean;
Parameters
- node
- Node | undefined
Returns
hasSymbol(node)
Returns whether node has been bound to a Symbol.
Declaration
hasSymbol(node: Node | undefined): boolean;
Parameters
- node
- Node | undefined
Returns
resolveSymbol(location, name, meaning)
Resolves a Symbol for the provided name at the given location that has the provided meaning.
Declaration
resolveSymbol(location: Node | undefined, name: string | undefined, meaning: SymbolKind): Symbol | undefined;
Parameters
Returns