-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
Support calling macros within other macros calls to enhance flexibility and composability. For example MACRO1(MACRO2()) should be possible. This should also work with different argument variations MACRO1(MACRO2(0x1), 0x2).
Example:
#define macro TWO_PARMS_TO_STACK(a, b) = takes(0) returns(2) {
<a>
<b>
}
#define macro ADD(ops) = takes(2) returns(1) {
<ops>
add
}
#define macro MAIN() = takes(0) returns(1) {
ADD(TWO_PARMS_TO_STACK(0x01, 0x01))
}
A similar feature was already proposed for huff-rs here: huff-language/huff-rs#265
Metadata
Metadata
Assignees
Labels
No labels