panylexpr

package module
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

panyl-expr

Author

Rangel Reale (rangelreale@gmail.com)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	When *vm.Program
	Do   *vm.Program
}

func NewCondition

func NewCondition(when, do string) (Condition, error)

func (Condition) Process

func (e Condition) Process(p *panyl.Process) error

type ConditionConfig

type ConditionConfig struct {
	Conditions []ConditionItemConfig `yaml:"conditions"`
}

type ConditionItemConfig

type ConditionItemConfig struct {
	When string `yaml:"when"`
	Do   string `yaml:"do"`
}

type Config

type Config struct {
	Conditions []Condition
}

func NewConfig

func NewConfig(options ...ConfigOption) (*Config, error)

func (*Config) Process

func (e *Config) Process(p *panyl.Process) error

type ConfigOption

type ConfigOption func(*Config) error

func WithConfigFile

func WithConfigFile(filename string) ConfigOption

func WithConfigReader

func WithConfigReader(r io.Reader) ConfigOption

type Expr

type Expr struct {
	Config *Config
}

func New

func New(options ...ConfigOption) (*Expr, error)

func (Expr) IsPanylPlugin

func (e Expr) IsPanylPlugin()

func (Expr) PostProcess

func (e Expr) PostProcess(result *panyl.Process) (bool, error)

func (Expr) PostProcessOrder

func (e Expr) PostProcessOrder() int

Jump to

Keyboard shortcuts

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