Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 460baf5a authored by POTTIER Francois's avatar POTTIER Francois
Browse files

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

parent d59e09d9
No related branches found
No related tags found
No related merge requests found
...@@ -191,19 +191,17 @@ ...@@ -191,19 +191,17 @@
(* TEMPORARY use string * loc so as to be able to give a location *) (* 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_FUN(term) CONCAT(import_, term)
#define __IMPORT \ #define __IMPORT \
exception Unbound = KitImport.Unbound \ exception Unbound = KitImport.Unbound \
class ['self] IMPORT_CLASS = object (_ : 'self) \
inherit [_] map \
inherit [_] KitImport.map \
end \
#define IMPORT(term) \ #define IMPORT(term) \
let IMPORT_FUN(term) env t = \ let IMPORT_FUN(term) env t = \
new IMPORT_CLASS # VISIT(term) env t \ (object \
inherit [_] map \
inherit [_] KitImport.map \
end) # VISIT(term) env t \
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment