Programatically calling a generator without passing metamodel as argument · Issue #432 · textX/textX · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to programmatically call a generator. The documentation suggests using generator_for_language_target(language_name, target_name, any_permitted=False) to get the callable, but this requires me to pass the metamodel as an argument robot_to_java(robot_mm, my_model) (from the examples).
According to the documentation , the GeneratorDesc should have a metamodel attribute, however this seems to be missing. For example, getting the description for textx->dot and looking at the attributes with dir():
You can get a meta-model of registered language using language_desciptions() function.
I think that this API needs some rework as the generator should be bound to its language and thus GeneratorDesc.generator function should accept only the model as the meta-model should be bound on generator description construction.
I'm trying to programmatically call a generator. The documentation suggests using
generator_for_language_target(language_name, target_name, any_permitted=False)
to get the callable, but this requires me to pass the metamodel as an argumentrobot_to_java(robot_mm, my_model)
(from the examples).According to the documentation , the
GeneratorDesc
should have ametamodel
attribute, however this seems to be missing. For example, getting the description for textx->dot and looking at the attributes withdir()
:Returns the following attributes:
Is there a way for me to use the metamodels already available to textx?
The text was updated successfully, but these errors were encountered: