semantic

package
v0.0.4-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reduce

func Reduce[AST any](fileContent []byte, strategyIndex int, ctx Context[AST]) ([][]byte, error)

Types

type Context

type Context[AST any] struct {
	Parser     Parser[AST]
	Strategies []Strategy[AST]
	Serializer Serializer[AST]
}

type Parser

type Parser[AST any] interface {
	Parse(fileContent []byte) (*AST, error)
}

type Serializer

type Serializer[AST any] interface {
	Serialize(abstractTree *AST) ([]byte, error)
}

type Strategy

type Strategy[AST any] interface {
	Apply(input []byte) []*AST
}

Jump to

Keyboard shortcuts

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