plugin

package
v0.0.3-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SemanticReduceFunction   = "Reduce"
	CountFunction            = "CountTokens"
	GetStrategyCountFunction = "GetStrategyCount"
	GetStrategyNameFunction  = "GetStrategyName"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Functions

type Functions struct {
	SemanticReduce   SemanticReductionFunction
	CountTokens      TokenCountFunction
	GetStrategyCount StrategyCountFunction
	GetStrategyName  StrategyNameFunction
}

func LoadSemanticReductionPlugin

func LoadSemanticReductionPlugin(language string) (*Functions, error)

type SemanticReductionFunction

type SemanticReductionFunction func(fileContent []byte, strategyIndex int) ([][]byte, error)

SemanticReductionFunction generates candidate programs based on the content of the current program

type StrategyCountFunction

type StrategyCountFunction func() int

StrategyCountFunction returns the total amount of strategies in the plugin

type StrategyNameFunction

type StrategyNameFunction func(index int) string

StrategyNameFunction returns the name of a strategy or empty if not found

type TokenCountFunction

type TokenCountFunction func(fileContent []byte) int

TokenCountFunction determines the amount of tokens in a program

Jump to

Keyboard shortcuts

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