daokoder / dao

Dao Programming Language
http://daoscript.org
Other
199 stars 19 forks source link

Finding routines by a decorator #456

Open Night-walker opened 9 years ago

Night-walker commented 9 years ago

It would be great to be able to extract all routines in a namespace decorated by a specific decorator. That it, using decorator as an annotation to automate registering of routines for certain tasks. Very handy for tests, RPC, event handlers and so on.

If just requires an extra DList in DaoRoutine containing names or pointers to decorators applied to it.

daokoder commented 9 years ago

Done (see DaoRoutineBody::decoratees).

Night-walker commented 9 years ago

Good, but... How do I find the test namespace from test.dao and @test decorator declared within? The test namespace created in dao_test_base.c doesn't seem to contain it, or I'm looking in the wrong place.