ssareducer

package
v1.4.4-alpha1202-loadi... Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: AGPL-3.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SkippedError error = utils.Error("compiling skipped")

Functions

func FilesHandler

func FilesHandler(
	ctx context.Context,
	filesystem filesys_interface.FileSystem,
	paths []string,
	handler func(path string, content []byte, store *utils.SafeMap[any]) (ssa.FrontAST, error),
	initWorker func() *utils.SafeMap[any],
	orderType ASTSequenceType,
	concurrency int,
) <-chan *FileContent

func ReducerCompile added in v1.3.3

func ReducerCompile(base string, opts ...Option) error

Types

type ASTSequenceType

type ASTSequenceType int
const (
	OutOfOrder ASTSequenceType = iota
	Order
	ReverseOrder
)

type Config

type Config struct {
	ProgramName string
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(opt ...Option) *Config

func (*Config) GetCancelFunc

func (c *Config) GetCancelFunc() context.CancelFunc

type FileContent

type FileContent struct {
	Path    string
	Content []byte
	AST     ssa.FrontAST
	Skip    bool
	Err     error
	Editor  *memedit.MemEditor
}

type FileHandler

type FileHandler func(path string, content []byte)

type Option

type Option func(config *Config)

func WithCompileMethod

func WithCompileMethod(handler compileMethod) Option

func WithContext

func WithContext(ctx context.Context) Option

func WithEmbedFS

func WithEmbedFS(fs embed.FS) Option

func WithEntryFiles added in v1.3.3

func WithEntryFiles(filename ...string) Option

func WithFileSystem added in v1.3.3

func WithFileSystem(fs fi.FileSystem) Option

func WithProgramName

func WithProgramName(name string) Option

func WithStrictMode

func WithStrictMode(b bool) Option

Jump to

Keyboard shortcuts

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