nitc :: modelize $ ModelBuilder
A model builder knows how to load nit source files and build the associated modelnitc :: modelize $ ModelBuilder
A model builder knows how to load nit source files and build the associated modelSerializable::inspect
to show more useful information
nitc :: modelbuilder
more_collections :: more_collections
Highly specific, but useful, collections-related classes.serialization :: serialization_core
Abstract services to serialize Nit objects to different formatsnitc :: toolcontext
Common command-line tool infrastructure than handle options and error messagescore :: union_find
union–find algorithm using an efficient disjoint-set data structurenitc :: actors_generation_phase
Generate a support module for each module that contain a class annotated withis actor
nitc :: serialization_model_phase
Phase generating methods (model-only) to serialize Nit objectsnitc :: api_metrics
nitc :: astbuilder
Instantiation and transformation of semantic nodes in the AST of expressions and statementscflags
and ldflags
to specify
nitc :: commands_ini
extra_java_files
to compile extra java files
nitc :: i18n_phase
Basic support of internationalization through the generation of id-to-string tablesnitc :: light_only
Compiler support for the light FFI only, detects unsupported usage of callbacksnitc
.
nitc :: nitmetrics
A program that collects various metrics on nit programs and librariesnitc :: nitrestful
Tool generating boilerplate code linking RESTful actions to Nit methodsthreaded
annotation
nitc :: separate_erasure_compiler
Separate compilation of a Nit program with generic type erasurenitc :: serialization_code_gen_phase
Phase generating methods (code) to serialize Nit objectsclone
method of the astbuilder tool
# Create a model from nit source files
module modelize
import modelize_property
redef class ModelBuilder
# Retrieve the associated AST node of a mentity.
# This method is used to associate model entity with syntactic entities.
#
# If the mentity is not associated with a node, returns null.
# This is always the case for MPackage, Mgroup, MClass and MProperty.
# MModule, MClassDef and MPropDef can also have no node associated
# (like fictive modules of generated attributes/methods).
fun mentity2node(mentity: MEntity): nullable ANode
do
if mentity isa MModule then
return mmodule2node(mentity)
else if mentity isa MClassDef then
return mclassdef2node(mentity)
else if mentity isa MPropDef then
return mpropdef2node(mentity)
end
return null
end
end
src/modelize/modelize.nit:15,1--39,3