C compiler with embedded metalanguage.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

19 行
776 B

@{
newObject(type, fields) { fields.__proto__ = type; fields }
newCint(text) { newObject(C_int, { text: text }) }
newCstring(text) { newObject(C_stringLiteral, { text: "\""+text+"\"" }) }
newCinitializer(list) { { __proto__: C_initializer, leftCurly: lcurly, initList: list, rightCurly: rcurly } }
newToken(text) { { __proto__: Token, text: text } }
comma = newToken(",");
lcurly = newToken("{");
rcurly = newToken("}");
nil;
}
enum foo { FOO, BAR, BAZ };
char *x[] = @(newCinitializer([newCstring("X"), comma, newCstring("Y"), comma, newCstring("Z")]));
int i = @(newCint("42"));
char *c = @(newCstring("42"));
int i = @({ __proto__: Token, text: "14" });
char *foos[] = { "FOO", "BAR", "BAZ" };