You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 45083dd
Browse filesBrowse the repository at this point in the historyBrowse files
Extend the scripting language with callable math functions, addressing #1141.
The tokenizer now emits a Comma token and the Pratt parser recognizes an
identifier followed by a parenthesized argument list as a function call.
Arity and unknown-function checks happen at parse time so ValidateScript
reports them early. Evaluation goes through a new Ast::ExprFunction node
that coerces each argument to double and dispatches to <cmath>.
Supported: abs, sqrt, pow, sin, cos, tan, asin, acos, atan, atan2, exp,
log, log10, floor, ceil, round, min, max, clamp.
A variable/enum still wins when the name is not followed by '('.
0 commit comments