Hello Hui,
I would invite you try my scripting language, zygomys. It is 100% Go. It
offers both (lisp) and {infix} syntax.
https://github.com/glycerine/zygomys
- Jason
On Wednesday, February 15, 2017 at 12:48:32 AM UTC-6, hui zhang wrote:
>
> I am developing a game engine
> I wish some event could be trigger by script. and this script expression
> is self-defined.
> Like below
> trigger.ini
> ----------------
> trigger = "power >= 1000"
> trigger = "statetype == A || statetype == B "
> trigger = "foo() > 1"
> -----------------
> *power* and *statetype* are a struct variable (it also can be defined as
> global) in go.
> *foo* are a struct method (it also can be defined as global)
>
>
> how can I parse the expression like "power >= 1000"
> and execute it in go.
>
> I notice there is a go/parse package , but I am not sure how to use it .
>
>
--
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.