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 .