• R/O
  • SSH

quipu: Commit

quipu mercurial repository


Commit MetaInfo

Révision6945579850876a49acbc8c0051d83be1ba33404c (tree)
l'heure2018-03-15 14:16:23
AuteurAgustina Arzille <avarzille@rise...>
CommiterAgustina Arzille

Message de Log

Add the macro expansion interfaces

Change Summary

Modification

diff -r 2a0570d7c65b -r 694557985087 builtins.cpp
--- a/builtins.cpp Tue Mar 13 03:02:51 2018 +0000
+++ b/builtins.cpp Thu Mar 15 05:16:23 2018 +0000
@@ -1125,6 +1125,22 @@
11251125 qp_return (QP_S(t));
11261126 }
11271127
1128+DEFBUILTIN (macroexp_1_fct)
1129+{
1130+ if (argc != 1)
1131+ interp->raise_nargs ("macroexp-1", 1, 1, argc);
1132+
1133+ qp_return (macroexp_1 (interp, *argv));
1134+}
1135+
1136+DEFBUILTIN (macroexp_fct)
1137+{
1138+ if (argc != 1)
1139+ interp->raise_nargs ("macroexp", 1, 1, argc);
1140+
1141+ qp_return (macroexp (interp, *argv));
1142+}
1143+
11281144 // Names for the builtins.
11291145 static const char BUILTIN_NAMES[] =
11301146 "%make-exception\0"
@@ -1160,6 +1176,8 @@
11601176 "nconcat\0"
11611177 "nrevconc\0"
11621178 "load\0"
1179+ "macroexp-1\0"
1180+ "macroexp\0"
11631181 ;
11641182
11651183 // List of builtins.
@@ -1201,7 +1219,9 @@
12011219 concat_fct,
12021220 nconcat,
12031221 nrevconc_fct,
1204- load_fct
1222+ load_fct,
1223+ macroexp_1_fct,
1224+ macroexp_fct
12051225 };
12061226
12071227 static native_function global_builtins[QP_NELEM (BUILTINS)];
Afficher sur ancien navigateur de dépôt.