-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for extensions, including usage and args check - use it…
… to add math functions (#96) * Added pretty cool support for extensions, including usage and arg check, example with math.Pow() * Adding sin,cos,tan, ln (natural log) too * gofumpt + adding sqrt,exp,asin,acos,atan * review comment * review comment: remove init() for extension, explicit init and err returned (still fatal, but returned) * revamped registration to register from function object themselves * less cool but... shorter/simpler and working with tinygo version of the function to name mapping * remove extra <> around error object values, usually I'd make a different PR for this but 1/2 of them are new to this PR and it came up here * lazy init (without sync.Once) * simplified usage, added a test for cases not covered by math functions * CreateCommand name was inspired by Tcl but ... we have functions not commands, so renamed accordingly * more godoc * adding Unwrap on all object types so we can also add sprintf and pass the variadic any args to it * adding a way to add initial identifiers, starting with PI and E
- Loading branch information
Showing
14 changed files
with
403 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.