transpiler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidRule is returned when the rule is invalid.
	ErrInvalidRule = errors.New("invalid rule")
)

Functions

This section is empty.

Types

type HuloCompilerRule

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

func ParseRule

func ParseRule(fullRule string) (hcr *HuloCompilerRule, err error)

ParseRule parses the rule and returns the HuloCompilerRule.

The rule is in the format of "name&version". If the version is not provided, the rule is parsed as the latest version.

func (*HuloCompilerRule) Name

func (r *HuloCompilerRule) Name() string

func (*HuloCompilerRule) Raw

func (r *HuloCompilerRule) Raw() string

func (*HuloCompilerRule) Version

func (r *HuloCompilerRule) Version() *semver.Version

type Strategy

type Strategy[T any] interface {
	Name() string
	Apply(root hast.Node, node hast.Node) (T, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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