vrodedanya / naobi

Naobi language
https://vrodedanya.github.io/naobi/
MIT License
4 stars 0 forks source link

[FEATURE] Events #15

Closed vrodedanya closed 2 years ago

vrodedanya commented 2 years ago

Is your feature request related to a problem? Please describe. Current event implementation can only trigger workflows. Need to add opportunity to storage some data in it

Describe the solution you'd like Probably need to create event definitions for compile time checks. Something like this:

...
event eventName(integer first, float second);
...

And using in workflow:

...
workflow main
{
    arise eventName(5, 5.0)
}
workflow sub
target eventName
{
    println(eventName.first)
    println(eventName.second)
}
...
vrodedanya commented 2 years ago

Change

...
event eventName(integer first, float second);
...

to

...
event eventName{integer first; float second}
...

Done in cfc3d03