mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
Allow primops to have Markdown documentation
This commit is contained in:
parent
88d5c9ec58
commit
33b1679d75
6 changed files with 92 additions and 15 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue