rubyast

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package rubyast provides utilities for working with Ruby AST nodes.

Index

Constants

View Source
const (
	NodeCall         = "call"
	NodeMethodCall   = "method_call"
	NodeIdentifier   = "identifier"
	NodeString       = "string"
	NodeSymbol       = "symbol"
	NodeSimpleSymbol = "simple_symbol"
	NodeBlock        = "block"
	NodeDoBlock      = "do_block"
	NodeArguments    = "argument_list"
	NodeProgram      = "program"
)

Tree-sitter Ruby node types.

Variables

This section is empty.

Functions

func AddSuiteToTarget added in v1.3.0

func AddSuiteToTarget(suite domain.TestSuite, parentSuite *domain.TestSuite, file *domain.TestFile)

AddSuiteToTarget adds a suite to either a parent suite or file.

func AddTestToTarget added in v1.3.0

func AddTestToTarget(test domain.Test, parentSuite *domain.TestSuite, file *domain.TestFile)

AddTestToTarget adds a test to either a suite or file.

func ExtractStringContent added in v1.3.0

func ExtractStringContent(node *sitter.Node, source []byte) string

ExtractStringContent removes surrounding quotes from string nodes.

func ExtractSymbolContent added in v1.3.0

func ExtractSymbolContent(node *sitter.Node, source []byte) string

ExtractSymbolContent removes leading colon from symbol nodes.

func FindBlock added in v1.3.0

func FindBlock(node *sitter.Node) *sitter.Node

FindBlock returns the first block or do_block child of a node.

Types

This section is empty.

Jump to

Keyboard shortcuts

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