Macros
macro tie(T: type; value: untyped)
-
Tie value to T.
If value is an identifier or symbol or symbol choice, it is tied under its own name.
If value is a routine, type, constant or variable declaration, the declared symbol is tied under its name.
If value is a statement list, it applies the above rules to each statement.
Source Edit macro unravel(T: type; name, node: untyped): untyped
-
Gathers the nodes tied to T under name into a node pattern specified by node.
If node is a collection literal, each node is appended to the collection.
If node is a call, each node is appended to the call as an argument.
If node is an anonymous routine, it is called with each node as the only argument. If the anonymous routine is a do, a template is generated instead of a proc.
Otherwise, node is directly called with each node as an argument.
Source Edit macro unravelCase(T: type; name, value, node: untyped): untyped
-
Creates a case statement for value and an of branch for each node tied to T under name into a node pattern specified by node.
If node is a call, the node is added to it as an argument and called in each branch.
If node is an anonymous routine, it is called with each node as the only argument. If the anonymous routine is a do, a template is generated instead of a proc.
Otherwise, node is directly called with each node as an argument.
Source Edit