cst

package
v1.8.22 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefineCursor

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

func (*DefineCursor) KnownDefinesAt

func (c *DefineCursor) KnownDefinesAt(offset int) []string

func (*DefineCursor) KnownDefinesViewAt

func (c *DefineCursor) KnownDefinesViewAt(offset int) []string

type Model

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

func Compact

func Compact(model *walk.CompactModel) *Model

func Pointer

func Pointer(model *walk.Model) *Model

func (*Model) CompactNode

func (m *Model) CompactNode(node syntax.NodeID) Node

func (*Model) EnclosingFunction

func (m *Model) EnclosingFunction(node Node) Node

func (*Model) Inactive

func (m *Model) Inactive(node Node) bool

func (*Model) NewDefineCursor

func (m *Model) NewDefineCursor() *DefineCursor

func (*Model) OfKind

func (m *Model) OfKind(kind parser.Kind) []Node

func (*Model) Parent

func (m *Model) Parent(node Node) Node

func (*Model) PointerNode

func (m *Model) PointerNode(node *parser.Node) Node

func (*Model) Range

func (m *Model) Range(node Node) source.Range

func (*Model) Root

func (m *Model) Root() Node

func (*Model) Source

func (m *Model) Source() []byte

func (*Model) Token

func (m *Model) Token(index int) Token

func (*Model) TokenCount

func (m *Model) TokenCount() int

func (*Model) Uncertain

func (m *Model) Uncertain(node Node) bool

type Node

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

func (Node) Child

func (n Node) Child(index int) Node

func (Node) ChildCount

func (n Node) ChildCount() int

func (Node) End

func (n Node) End() int

func (Node) Field

func (n Node) Field(name string) Node

func (Node) HasChildToken

func (n Node) HasChildToken(kind token.Kind) bool

func (Node) HasError

func (n Node) HasError() bool

func (Node) ID

func (n Node) ID() syntax.NodeID

func (Node) Kind

func (n Node) Kind() parser.Kind

func (Node) MissingSemi

func (n Node) MissingSemi() bool

func (Node) Pointer

func (n Node) Pointer() *parser.Node

func (Node) Range

func (n Node) Range() source.Range

func (Node) Same

func (n Node) Same(other Node) bool

func (Node) Start

func (n Node) Start() int

func (Node) Text

func (n Node) Text() string

func (Node) TokenKind

func (n Node) TokenKind() token.Kind

func (Node) TokenText

func (n Node) TokenText() string

func (Node) Valid

func (n Node) Valid() bool

type Token

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

func (Token) End

func (t Token) End() int

func (Token) EndPosition

func (t Token) EndPosition() token.Position

func (Token) EndsLine

func (t Token) EndsLine() bool

func (Token) Kind

func (t Token) Kind() token.Kind

func (Token) Origin

func (t Token) Origin() *token.Origin

func (Token) Start

func (t Token) Start() int

func (Token) StartPosition

func (t Token) StartPosition() token.Position

func (Token) Text

func (t Token) Text() string

func (Token) Valid

func (t Token) Valid() bool

Jump to

Keyboard shortcuts

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