Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Num ¶
type Num struct {
Value any // int64 or float64, nil on error
}
func Expr ¶
Expr evaluates the given expression tokens and returns the result. It supports the following operators: +, -, *, /, and, or, not, ==, !=, >, >=, <, <=. Non-zero values are treated as true, zero values are treated as false. If no error occurs, the result is either an int64 or a float64. If all numbers are integer, the result is an int64, otherwise if there is any float number, the result is a float64.
Click to show internal directories.
Click to hide internal directories.