This is a step to downgrade modelbuilder in favor of toolcontext as
the main over-lord object.
Signed-off-by: Jean Privat <jean@pryen.org>
super
option_context.add_option(opt_path, opt_only_parse, opt_only_metamodel)
end
+
+ fun modelbuilder: ModelBuilder do return modelbuilder_real.as(not null)
+ private var modelbuilder_real: nullable ModelBuilder = null
end
# A model builder knows how to load nit source files and build the associated model
do
self.model = model
self.toolcontext = toolcontext
+ assert toolcontext.modelbuilder_real == null
+ toolcontext.modelbuilder_real = self
# Setup the paths value
paths.append(toolcontext.opt_path.value)