c3lang / c3c

Compiler for the C3 language
GNU Lesser General Public License v3.0
1.34k stars 80 forks source link

Named compile-time arguments #1156

Closed cbuttner closed 2 months ago

cbuttner commented 4 months ago

Is this a possibility?

macro foo($bar, $Type) {}
fn void bar() {
  foo(.$bar = 1, .$Type = int);
}
lerno commented 4 months ago

Yes, that should work.

lerno commented 4 months ago

You can now test this on latest.

cbuttner commented 2 months ago

Looks good.