expr

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 9 Imported by: 1

README

expr

Expressions for use in go-libraries

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eval

func Eval(infix string, placeholders []map[string]any) (result any, err error)

func PostfixToInfix

func PostfixToInfix(postfix Postfix) (string, error)

func Value

func Value(placeholder string, placeholders []map[string]any) (val any, err error)

Types

type Postfix

type Postfix []Token

func InfixToPostfix

func InfixToPostfix(infix string) (postfix Postfix, err error)

func (Postfix) Eval

func (postfix Postfix) Eval(placeholders []map[string]any) (value any, err error)

func (Postfix) String

func (postfix Postfix) String() string

type Token

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

func (Token) MarshalJSON

func (token Token) MarshalJSON() ([]byte, error)

func (Token) Nature

func (token Token) Nature() string

func (Token) Origin

func (token Token) Origin() string

Jump to

Keyboard shortcuts

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