nitlang / nit

Nit language
http://nitlanguage.org
Apache License 2.0
238 stars 64 forks source link

modelize_property: Add `unsafe_add_mclassdef2nclassdef` #2817

Closed Delja closed 4 years ago

Delja commented 4 years ago

Add a way to associate a nclassdef with its mclassdef without verification.

Currently, to attach an AClass with an MClass, you must use the build_property method which performs all the checks and builds the representation in the model. Thanks to the Nitbuilder which facilitates the construction of entities, we find ourselves in a case where we can build the representation of a class in the model and then build the corresponding ast. It is therefore necessary to provide a service to associate the both elements.