testutil

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testutil provides shared test helpers for building AST nodes across all diffmantic test packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Leaf

func Leaf(typ, label string) *treesitter.ASTNode

Leaf creates a node with no children.

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.

Jump to

Keyboard shortcuts

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