This information will be used to generate frontier files
with extern if necessary and also by the stub generator.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
# Dictionary of global classes
var _global_class_by_name: Map[Symbol, MMGlobalClass] = new HashMap[Symbol, MMGlobalClass]
+ # Is a hybrid module partially implemented in extern code
+ # It is if it contains a new extern class or an
+ # extern class declaration
+ var is_extern_hybrid : Bool writable = false
+
protected init(name: Symbol, dir: MMDirectory, context: MMContext, loc: Location)
do
_name = name
if n_kwredef != null then
v.error(self, "Redef error: No class {name} is imported. Remove the redef keyword to define a new class.")
end
+ if glob.is_extern then
+ glob.mmmodule.is_extern_hybrid = true
+ end
for c in _local_class.cshe.direct_greaters do
var cg = c.global
_is_extern = node isa AExternPropdef
_is_abstract = node isa ADeferredMethPropdef
_extern_name = null
+
+ if is_extern then
+ mmmodule.is_extern_hybrid = true
+ end
end
end