Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Enable use of macros as macro args #265

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

d1ll0n
Copy link
Contributor

@d1ll0n d1ll0n commented Mar 30, 2023

Overview

relies on #264

Allows use of macros as macro args.

This only partially enables this feature as it does not support providing arguments to the macros given as args. I didn't implement this because I believe it would require modification to the parser/lexer, and I don't know rust or this repo well enough to try that. It does at least restore the original functionality from Aztec's version though.

To make this work with bubbled args, I had to modify the resolution order for MacroArg::Ident, as it seemed to be causing a deadlock with the constants mutex. I'm too much of a rust noob to figure that one out, but the change I made seems to have fixed it, maybe because the rust compiler sees that the reference is dropped, or maybe it's a completely different issue unrelated to the mutex.

@d1ll0n d1ll0n requested review from jtriley-eth and removed request for jtriley-eth March 30, 2023 09:27
@d1ll0n d1ll0n added the codegen Code Generation Related. label Mar 30, 2023
jtriley-eth
jtriley-eth previously approved these changes Mar 31, 2023
Copy link
Contributor

@jtriley-eth jtriley-eth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@jtriley-eth jtriley-eth dismissed their stale review March 31, 2023 22:07

correcting

Copy link
Contributor

@jtriley-eth jtriley-eth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good, though this should be branched from huff-language:stage, not main

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
codegen Code Generation Related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants