ptest

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: MIT Imports: 6 Imported by: 0

README

BNF

<expression> ::= ( <term> | ! <term> ) [ <combine_opts> <expression> ]*
<combine_opts> ::= ("-a" | "-o")
<term> ::= <factor> [ <between_opts> <factor> ] | <prefix_opts> <factor> 
<prefix_opts> ::= "-" [bcdefghknprstuwxzLOGS]
<between_opts> ::= ("=" | "==" | "!=" | ">" | ">=" | "<" | "<=" | "-nt" | "-ot" | "-ef" | "-eq" | "-ne" | "-lt" | "-le" | "-gt" | "-ge" | "-starts" | "-ends" | "-contains") 
<factor> ::= <string> | <number> | "(" expression ")"
<number> ::= [0-9]+
<string> ::= [a-zA-Z_$][-a-zA-Z_0-9$]+

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Expression

type Expression struct {
	Original string
	// contains filtered or unexported fields
}

func New

func New(expression []string) *Expression

func (*Expression) Eval

func (e *Expression) Eval() (bool, error)

func (*Expression) SetEnv

func (e *Expression) SetEnv(key, value string) bool

func (*Expression) Term

func (e *Expression) Term() (bool, error)

Jump to

Keyboard shortcuts

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