bool functions retrofitted for eval change
This commit is contained in:
parent
2151b6c5d2
commit
f3e39e156c
3 changed files with 230 additions and 0 deletions
|
|
@ -45,6 +45,56 @@ func GenFuncTable() ast.FuncTable {
|
|||
TimesCalled: 0,
|
||||
Args: 0,
|
||||
},
|
||||
|
||||
"eq": &ast.Function{
|
||||
Function: eq,
|
||||
Name: "==",
|
||||
TimesCalled: 0,
|
||||
Args: 2,
|
||||
},
|
||||
|
||||
"ne": &ast.Function{
|
||||
Function: ne,
|
||||
Name: "!=",
|
||||
TimesCalled: 0,
|
||||
Args: 2,
|
||||
},
|
||||
|
||||
"<": &ast.Function{
|
||||
Function: lt,
|
||||
Name: "<",
|
||||
TimesCalled: 0,
|
||||
Args: 2,
|
||||
},
|
||||
|
||||
">": &ast.Function{
|
||||
Function: gt,
|
||||
Name: ">",
|
||||
TimesCalled: 0,
|
||||
Args: 2,
|
||||
},
|
||||
|
||||
"<=": &ast.Function{
|
||||
Function: lte,
|
||||
Name: "<=",
|
||||
TimesCalled: 0,
|
||||
Args: 2,
|
||||
},
|
||||
|
||||
">=": &ast.Function{
|
||||
Function: gte,
|
||||
Name: ">=",
|
||||
TimesCalled: 0,
|
||||
Args: 2,
|
||||
},
|
||||
|
||||
"!": &ast.Function{
|
||||
Function: not,
|
||||
Name: "!",
|
||||
TimesCalled: 0,
|
||||
Args: 1,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
return stdlib
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue