lsutil

package
v0.0.0-...-09edcb8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertHasRealPosition

func AssertHasRealPosition(node *ast.Node)

func GetFirstToken

func GetFirstToken(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node

func GetLastChild

func GetLastChild(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node

Replaces last(node.getChildren(sourceFile))

func GetLastToken

func GetLastToken(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node

func GetLastVisitedChild

func GetLastVisitedChild(node *ast.Node, sourceFile *ast.SourceFile) *ast.Node

Gets the last visited child of the given node. NOTE: This doesn't include unvisited tokens; for this, use `getLastChild` or `getLastToken`.

func NodeIsASICandidate

func NodeIsASICandidate(node *ast.Node, file *ast.SourceFile) bool

func PositionIsASICandidate

func PositionIsASICandidate(pos int, context *ast.Node, file *ast.SourceFile) bool

func SyntaxMayBeASICandidate

func SyntaxMayBeASICandidate(kind ast.Kind) bool

func SyntaxRequiresTrailingCommaOrSemicolonOrASI

func SyntaxRequiresTrailingCommaOrSemicolonOrASI(kind ast.Kind) bool

func SyntaxRequiresTrailingFunctionBlockOrSemicolonOrASI

func SyntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind ast.Kind) bool

func SyntaxRequiresTrailingModuleBlockOrSemicolonOrASI

func SyntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind ast.Kind) bool

func SyntaxRequiresTrailingSemicolonOrASI

func SyntaxRequiresTrailingSemicolonOrASI(kind ast.Kind) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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