processing

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldNameToString

func FieldNameToString(fieldName ast.Node) string

func FindBindByIDViaStack

func FindBindByIDViaStack(stack *nodestack.NodeStack, id ast.Identifier) *ast.LocalBind

func FindNodeByPosition

func FindNodeByPosition(node ast.Node, location ast.Location) (*nodestack.NodeStack, error)

func FindParameterByIDViaStack

func FindParameterByIDViaStack(stack *nodestack.NodeStack, id ast.Identifier, partialMatchFields bool) *ast.Parameter

func InRange

func InRange(point ast.Location, theRange ast.LocationRange) bool

func RangeGreaterOrEqual

func RangeGreaterOrEqual(a ast.LocationRange, b ast.LocationRange) bool

RangeGreaterOrEqual returns true if the first range is greater than the second.

Types

type ObjectRange

type ObjectRange struct {
	Filename       string
	SelectionRange ast.LocationRange
	FullRange      ast.LocationRange
	FieldName      string
	Node           ast.Node
}

func FieldToRange

func FieldToRange(field ast.DesugaredObjectField) ObjectRange

func LocalBindToRange

func LocalBindToRange(bind ast.LocalBind) ObjectRange

type Processor added in v0.14.1

type Processor struct {
	// contains filtered or unexported fields
}

func NewProcessor added in v0.14.1

func NewProcessor(cache *cache.Cache, vm *jsonnet.VM) *Processor

func (*Processor) FindRangesFromIndexList added in v0.14.1

func (p *Processor) FindRangesFromIndexList(stack *nodestack.NodeStack, indexList []string, partialMatchFields bool) ([]ObjectRange, error)

func (*Processor) FindTopLevelObjects added in v0.14.1

func (p *Processor) FindTopLevelObjects(stack *nodestack.NodeStack) []*ast.DesugaredObject

Find all ast.DesugaredObject's from NodeStack

func (*Processor) FindTopLevelObjectsInFile added in v0.14.1

func (p *Processor) FindTopLevelObjectsInFile(filename, importedFrom string) []*ast.DesugaredObject

func (*Processor) FindVarReference added in v0.14.1

func (p *Processor) FindVarReference(varNode *ast.Var) (ast.Node, error)

FindVarReference finds the object that the variable is referencing To do so, we get the stack where the var is used and search that stack for the var's definition

Jump to

Keyboard shortcuts

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