Documentation
¶
Overview ¶
Package internalast contains helpers shared by every per-language strategy implementation. Kept in a sub-package so that experimentation in one strategy can not accidentally widen the helper API.
Index ¶
- func FindChildByType(n *sitter.Node, kind string) *sitter.Node
- func FirstLine(s string) string
- func HasModifier(modifiers []string, m string) bool
- func IsCapitalized(name string) bool
- func NodeSpan(n *sitter.Node) astkit.LineRange
- func NodeText(n *sitter.Node, src []byte) string
- func WalkChildren(n *sitter.Node, fn func(*sitter.Node))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindChildByType ¶
FindChildByType returns the first immediate child of n whose Type() equals kind.
func HasModifier ¶
HasModifier reports whether modifiers contains m.
func IsCapitalized ¶
IsCapitalized reports whether name begins with an uppercase ASCII letter. Useful for Go's export rule.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.