operators

package
v2.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOperator

type IOperator interface {
	Preprocess(io.Reader)
	Run(io.Reader)
}

type NestingError

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

func (*NestingError) Error

func (n *NestingError) Error() string

type Operator

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

func NewAssembler

func NewAssembler(ctx *processors.Context) *Operator

NewAssembler creates a new Operator based on context.

func (*Operator) Run

func (a *Operator) Run(input string) (string, error)

type ProcessorStack

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

func NewProcessorStack

func NewProcessorStack() ProcessorStack

type Stats

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

Stats are used by preprocessors to track indentation levels and count lines.

func NewStats

func NewStats() *Stats

NewStats creates a new Stats.

func (*Stats) LineParsed

func (s *Stats) LineParsed()

LineParsed increments the lines parsed counter.

func (*Stats) ProcessorEnd

func (s *Stats) ProcessorEnd() error

ProcessorEnd decrements the indentation level caused by leaving a preprocessor. Returns an error if we went too far.

func (*Stats) ProcessorStart

func (s *Stats) ProcessorStart()

ProcessorStart increments the indentation level caused to entering a new Preprocessor.

Jump to

Keyboard shortcuts

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