Show / Hide Table of Contents

    Class Resolver

    Package: grammarkdown

    Constructors

    constructor(bindings, lineOffsetMap)

    Constructs a new instance of the Resolver class

    Declaration
    constructor(bindings: BindingTable, lineOffsetMap?: LineOffsetMap);
    Parameters
    bindings
    BindingTable

    lineOffsetMap
    LineOffsetMap

    Properties

    bindings

    Declaration
    readonly bindings: BindingTable;
    Property Value
    BindingTable

    Methods

    createNavigator(node)

    Creates a NodeNavigator pointing at node. Returns undefined if node does not have a SourceFile as an ancestor.

    Declaration
    createNavigator(node: Node): NodeNavigator | undefined;
    Parameters
    node
    Node

    Returns
    NodeNavigator | undefined

    getDeclarations(node)

    Gets the declarations for the provided identifier.

    Declaration
    getDeclarations(node: Identifier): Declaration[];
    Parameters
    node
    Identifier

    Returns
    Declaration[]

    getDeclarations(name, meaning, location)

    Gets the declarations for name at the provided location that have the given meaning.

    Declaration
    getDeclarations(name: string, meaning: SymbolKind.SourceFile, location: Node): SourceFile[];
    Parameters
    name
    string

    meaning
    SourceFile

    location
    Node

    Returns
    SourceFile[]

    getDeclarations(name, meaning, location)

    Gets the declarations for name at the provided location that have the given meaning.

    Declaration
    getDeclarations(name: string, meaning: SymbolKind.Production, location: Node): Production[];
    Parameters
    name
    string

    meaning
    Production

    location
    Node

    Returns
    Production[]

    getDeclarations(name, meaning, location)

    Gets the declarations for name at the provided location that have the given meaning.

    Declaration
    getDeclarations(name: string, meaning: SymbolKind.Parameter, location: Node): Parameter[];
    Parameters
    name
    string

    meaning
    Parameter

    location
    Node

    Returns
    Parameter[]

    getDeclarations(name, meaning, location)

    Gets the declarations for name at the provided location that have the given meaning.

    Declaration
    getDeclarations(name: string, meaning: SymbolKind, location: Node): Declaration[];
    Parameters
    name
    string

    meaning
    SymbolKind

    location
    Node

    Returns
    Declaration[]

    getEffectiveFilenameAtPosition(sourceFile, position)

    Gets the effective filename of a raw position within a source file, taking into account @line directives.

    Declaration
    getEffectiveFilenameAtPosition(sourceFile: SourceFile, position: Position): string;
    Parameters
    sourceFile
    SourceFile

    position
    Position

    Returns
    string

    getEffectivePosition(sourceFile, position)

    Gets the effective position of a raw position within a source file, taking into account @line directives.

    Declaration
    getEffectivePosition(sourceFile: SourceFile, position: Position): Position;
    Parameters
    sourceFile
    SourceFile

    position
    Position

    Returns
    Position

    getEffectiveRange(sourceFile, range)

    Gets the effective range of a raw range within a source file, taking into account @line directives.

    Declaration
    getEffectiveRange(sourceFile: SourceFile, range: Range): Range;
    Parameters
    sourceFile
    SourceFile

    range
    Range

    Returns
    Range

    getParent(node)

    Gets the parent Node for node.

    Declaration
    getParent(node: Node): Node | undefined;
    Parameters
    node
    Node

    Returns
    Node | undefined

    getProductionLinkId(node)

    Get the link id for the Production to which the provided node resolves.

    Declaration
    getProductionLinkId(node: Identifier): string | undefined;
    Parameters
    node
    Identifier

    Returns
    string | undefined

    getRawFilenameAtEffectivePosition(filename, position)

    Gets the filename of a parsed grammarkdown file for the provided effective filename and position, taking into account @line directives.

    Declaration
    getRawFilenameAtEffectivePosition(filename: string, position: Position): string | undefined;
    Parameters
    filename
    string

    position
    Position

    Returns
    string | undefined

    getRawPositionFromEffectivePosition(filename, position)

    Gets the position in a parsed grammarkdown file for the provided effective filename and position, taking into account @line directives.

    Declaration
    getRawPositionFromEffectivePosition(filename: string, position: Position): Position | undefined;
    Parameters
    filename
    string

    position
    Position

    Returns
    Position | undefined

    getRawRangeFromEffectiveRange(filename, range)

    Gets the range in a parsed grammarkdown file for the provided effective filename and position, taking into account @line directives.

    Declaration
    getRawRangeFromEffectiveRange(filename: string, range: Range): Range | undefined;
    Parameters
    filename
    string

    range
    Range

    Returns
    Range | undefined

    getReferences(node)

    Gets the references to the provided identifier.

    Declaration
    getReferences(node: Identifier): Node[];
    Parameters
    node
    Identifier

    Returns
    Node[]

    getReferences(name, meaning, location)

    Gets the references to name at the provided location that have the given meaning.

    Declaration
    getReferences(name: string, meaning: SymbolKind, location: Node): Node[];
    Parameters
    name
    string

    meaning
    SymbolKind

    location
    Node

    Returns
    Node[]

    getRightHandSideLinkId(node, includePrefix)

    Gets the right-hand-side link id for the provided RightHandSide.

    Declaration
    getRightHandSideLinkId(node: RightHandSide, includePrefix: boolean): string;
    Parameters
    node
    RightHandSide

    includePrefix
    boolean

    When true, prepends the production link id.

    Returns
    string

    getSourceFileOfNode(node)

    Gets the SourceFile of node, if it belongs to one.

    Declaration
    getSourceFileOfNode(node: Node): SourceFile | undefined;
    Parameters
    node
    Node

    Returns
    SourceFile | undefined

    getSymbolOfNode(node)

    Gets the Symbol for node, if it has one.

    Declaration
    getSymbolOfNode(node: Node | undefined): Symbol | undefined;
    Parameters
    node
    Node | undefined

    Returns
    Symbol | undefined

    resolveSymbol(location, name, meaning)

    Resolves a Symbol for the provided name at the given location that has the provided meaning.

    Declaration
    resolveSymbol(location: Node, name: string, meaning: SymbolKind): Symbol | undefined;
    Parameters
    location
    Node

    name
    string

    meaning
    SymbolKind

    Returns
    Symbol | undefined

    Back to top Generated by DocFX