aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-08-24 13:11:56 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-08-24 13:16:02 +0200
commit33b1679d75f2a3a5dac053431a41897ebf96a3f3 (patch)
tree879d2bb748c7d2bc4c6daf8ffa49c604dd265e6d /src/libexpr/primops.hh
parent88d5c9ec584f000c9a66ad34631fe4eb5c194172 (diff)
Allow primops to have Markdown documentation
Diffstat (limited to 'src/libexpr/primops.hh')
-rw-r--r--src/libexpr/primops.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libexpr/primops.hh b/src/libexpr/primops.hh
index 75c460ecf..ed5e2ea58 100644
--- a/src/libexpr/primops.hh
+++ b/src/libexpr/primops.hh
@@ -10,9 +10,11 @@ struct RegisterPrimOp
struct Info
{
std::string name;
- size_t arity;
- PrimOpFun primOp;
+ std::vector<std::string> args;
+ size_t arity = 0;
+ const char * doc;
std::optional<std::string> requiredFeature;
+ PrimOpFun fun;
};
typedef std::vector<Info> PrimOps;
@@ -26,6 +28,8 @@ struct RegisterPrimOp
size_t arity,
PrimOpFun fun,
std::optional<std::string> requiredFeature = {});
+
+ RegisterPrimOp(Info && info);
};
/* These primops are disabled without enableNativeCode, but plugins