Documentation
¶
Overview ¶
Package testutil provides shared test helpers for building AST nodes across all diffmantic test packages.
Index ¶
- func Leaf(typ, label string) *treesitter.ASTNode
- func Node(typ, label string, children ...*treesitter.ASTNode) *treesitter.ASTNode
- func NodeAt(typ, label string, startByte, endByte uint32) *treesitter.ASTNode
- func NodeAtRC(typ, label string, row, col uint32) *treesitter.ASTNode
- func Tree(parent *treesitter.ASTNode, children ...*treesitter.ASTNode) *treesitter.ASTNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Node ¶
func Node(typ, label string, children ...*treesitter.ASTNode) *treesitter.ASTNode
Node builds an ASTNode and links its children.
func NodeAt ¶
func NodeAt(typ, label string, startByte, endByte uint32) *treesitter.ASTNode
NodeAt creates a node with start and end bytes.
func NodeAtRC ¶
func NodeAtRC(typ, label string, row, col uint32) *treesitter.ASTNode
NodeAtRC creates a node with row and column info.
func Tree ¶
func Tree(parent *treesitter.ASTNode, children ...*treesitter.ASTNode) *treesitter.ASTNode
Tree links children to their parent and returns it.
Types ¶
This section is empty.