processors

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AssembleInput  string = `^\s*##!=<\s*(.*)$`
	AssembleOutput string = `^\s*##!=>\s*(.*)$`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Assemble

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

func NewAssemble

func NewAssemble(ctx *Context) *Assemble

NewAssemble creates a new assemble processor

func (*Assemble) Complete

func (a *Assemble) Complete() ([]string, error)

Complete finalizes the processor, producing its output

func (*Assemble) Consume

func (a *Assemble) Consume(lines []string) error

Consume applies the state of a nested processor

func (*Assemble) ProcessLine

func (a *Assemble) ProcessLine(line string) error

ProcessLine applies the processors logic to a single line

type CmdLine

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

func NewCmdLine

func NewCmdLine(ctx *Context, cmdType CmdLineType) *CmdLine

NewCmdLine creates a new cmdline processor

func (*CmdLine) Complete

func (c *CmdLine) Complete() ([]string, error)

Complete is the class method

func (*CmdLine) Consume

func (c *CmdLine) Consume(lines []string) error

Consume applies the state of a nested processor

func (*CmdLine) ProcessLine

func (c *CmdLine) ProcessLine(line string) error

ProcessLine applies the processors logic to a single line

type CmdLineType

type CmdLineType int
const (
	CmdLineUndefined CmdLineType = iota
	CmdLineUnix
	CmdLineWindows
)

func CmdLineTypeFromString

func CmdLineTypeFromString(t string) (CmdLineType, error)

CmdLineTypeFromString will return a CmdLineType based on the string you enter, or an CmdLineUndefined and a new error.

type Context

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

func NewContext

func NewContext(rootContext *context.Context) *Context

NewContext creates a new processor context using the `rootDir` as the root directory.

func (*Context) Dump

func (ctx *Context) Dump(w io.Writer)

Dump dumps the context to the passed io.Writer.

func (*Context) RootContext

func (ctx *Context) RootContext() *context.Context

RootContext returns the root context of the toolchain

type EvasionPatterns

type EvasionPatterns int

type IProcessor

type IProcessor interface {
	// ProcessLine applies the processors logic to a single line
	ProcessLine(line string) error
	// Complete finalizes the processor, producing its output
	Complete() ([]string, error)
	// Consume applies the state of a nested processor
	Consume([]string) error
}

type Processor

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

func NewProcessor

func NewProcessor(ctx *Context) *Processor

NewProcessor creates a new processor with passed context.

Jump to

Keyboard shortcuts

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