constfold

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func And

func And(x, y meta.ConstValue) meta.ConstValue

And performs logical "&&". Also works for "and" operator.

func BitAnd

func BitAnd(x, y meta.ConstValue) meta.ConstValue

BitAnd performs bitwise "&".

func BitOr

func BitOr(x, y meta.ConstValue) meta.ConstValue

BitOr performs bitwise "|".

func Concat

func Concat(x, y meta.ConstValue) meta.ConstValue

Concat performs string "." operation.

func Eval

Eval tries to compute the e using the constant expressions folding. In case of failure, meta.UnknownValue is returned.

func Minus

func Minus(x, y meta.ConstValue) meta.ConstValue

Minus performs arithmetic "-".

func Mul

func Mul(x, y meta.ConstValue) meta.ConstValue

Mul performs arithmetic "*".

func Neg

Neg performs unary "-".

func Not

Not performs unary "!".

func Or

func Or(x, y meta.ConstValue) meta.ConstValue

Or performs logical "||". Also works for "or" operator.

func Plus

func Plus(x, y meta.ConstValue) meta.ConstValue

Plus performs arithmetic "+".

Types

This section is empty.

Jump to

Keyboard shortcuts

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