nsensfel / tonkadur

Narrative scripting/programming tool. Write stories in your favorite editor using a feature-rich language, compile them into a very small and simple language to easily integrate them into your game.
https://tonkadur.of.tacticians.online
Apache License 2.0
3 stars 0 forks source link

Procedure & (lambda) function as extra instructions & computations #31

Open nsensfel opened 3 years ago

nsensfel commented 3 years ago

Add two first level instructions:

(define_computation <return_type> <name> (<var list>) <computation>) which defines a lambda function that is registered as an extra computation.

(define_instruction <name> (<var list>) <instruction list>) which defines a sequence that is registered as an extra instruction.

Add a warning if those would collide with an existing computation/instruction, but then replace the existing one.

nsensfel commented 2 years ago

I think it might be better to actually have: