operators

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: Apache-2.0, MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	L = 0
	R = 1
)

Variables

View Source
var Ops = map[string]*Operator{}

Functions

func IsOperator

func IsOperator(str string) bool

func Register

func Register(op *Operator)

Types

type Operator

type Operator struct {
	Name          string
	Precedence    int
	Associativity int
	Args          int
	Operation     func(args []float64) float64
}

func FindOperatorFromString

func FindOperatorFromString(str string) *Operator

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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