nixd
Loading...
Searching...
No Matches
PrimOpLookup.cpp
Go to the documentation of this file.
2
3using namespace nixf;
4
6 if (PrimOpsInfo.contains(Name)) {
8 }
9
10 // Prefix the name with "__", and check again.
11 std::string PrefixedName = "__" + Name;
12 if (PrimOpsInfo.contains(PrefixedName)) {
14 }
15
17}
PrimopLookupResult lookupGlobalPrimOpInfo(const std::string &Name)
Look up information about a global primop by name.
std::map< std::string, nixf::PrimOpInfo > PrimOpsInfo
PrimopLookupResult
Result of looking up a primop by name.
Definition PrimOpInfo.h:40
@ PrefixedFound
The primop was found, but needs "builtin." prefix.
Definition PrimOpInfo.h:44
@ NotFound
The primop was not found.
Definition PrimOpInfo.h:46
@ Found
The primop was found with an exact match.
Definition PrimOpInfo.h:42