C compiler with embedded metalanguage.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

11 lines
317 B

@{import("boot.mc");}
enum foo { Closed = 0, ReadOnly = 1, WriteOnly = 2 };
@{
idToString(x) {{ __proto__: C_string, value: "\"" + string(x.name.identifier) + "\"" }}
notToken(x) { x.__proto__ != Token }
nil;
}
static char *stateNames[] = { @(map(idToString, program.enums.foo.enumList, notToken)) };