astnav

package
v0.0.0-...-563c3ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindNextToken

func FindNextToken(previousToken *ast.Node, parent *ast.Node, file *ast.SourceFile) *ast.Node

func FindPrecedingToken

func FindPrecedingToken(sourceFile *ast.SourceFile, position int) *ast.Node

Finds the leftmost token satisfying `position < token.End()`. If the leftmost token satisfying `position < token.End()` is invalid, or if position is in the trivia of that leftmost token, we will find the rightmost valid token with `token.End() <= position`.

func FindPrecedingTokenEx

func FindPrecedingTokenEx(sourceFile *ast.SourceFile, position int, startNode *ast.Node, excludeJSDoc bool) *ast.Node

func GetStartOfNode

func GetStartOfNode(node *ast.Node, file *ast.SourceFile, includeJSDoc bool) int

func GetTokenAtPosition

func GetTokenAtPosition(sourceFile *ast.SourceFile, position int) *ast.Node

func GetTouchingPropertyName

func GetTouchingPropertyName(sourceFile *ast.SourceFile, position int) *ast.Node

func GetTouchingToken

func GetTouchingToken(sourceFile *ast.SourceFile, position int) *ast.Node

func VisitEachChildAndJSDoc

func VisitEachChildAndJSDoc(
	node *ast.Node,
	sourceFile *ast.SourceFile,
	visitNode func(*ast.Node, *ast.NodeVisitor) *ast.Node,
	visitNodes func(*ast.NodeList, *ast.NodeVisitor) *ast.NodeList,
)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL