Commit 460baf5a authored by POTTIER Francois's avatar POTTIER Francois

Change the IMPORT macros to build an object on-the-fly.

parent d59e09d9
......@@ -191,19 +191,17 @@
(* TEMPORARY use string * loc so as to be able to give a location *)
#define IMPORT_CLASS __import
#define IMPORT_FUN(term) CONCAT(import_, term)
#define __IMPORT \
exception Unbound = KitImport.Unbound \
class ['self] IMPORT_CLASS = object (_ : 'self) \
inherit [_] map \
inherit [_] KitImport.map \
end \
#define IMPORT(term) \
let IMPORT_FUN(term) env t = \
new IMPORT_CLASS # VISIT(term) env t \
(object \
inherit [_] map \
inherit [_] KitImport.map \
end) # VISIT(term) env t \
(* -------------------------------------------------------------------------- *)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment