Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
alphaLib
Commits
460baf5a
Commit
460baf5a
authored
Feb 08, 2017
by
POTTIER Francois
Browse files
Change the IMPORT macros to build an object on-the-fly.
parent
d59e09d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/AlphaLibMacros.cppo.ml
View file @
460baf5a
...
...
@@ -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
\
(* -------------------------------------------------------------------------- *)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment