Done and documented :)
As I also wrote in README.md, see
https://github.com/cosmos72/gomacro/blob/master/fast/cmd.go#L37
for the documentation and API to define new special commands.
The TL;DR summary is:
choose a name for the new command, write a function with signature
func(interp *fast.Interp, arg string, opt fast.CmdOpt) (string,
fast.CmdOpt)
that implements the desired functionality, write the help string, then call:
fast.Commands.Add(Cmd{Name: name, Func: function, Help: help})
On Saturday, April 28, 2018 at 11:59:41 PM UTC+2, Maxim Khitrov wrote:
>
> Do you have examples of adding custom ":xyz" or other language extensions?
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.