-
I'm writing a transpiler for another lang in Zig, and I was wondering if AroCC has the ability to convert its Tokens or AST into valid C code at some point in its process. Is C source code output possible with the existing toolset of AroCC in some way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
It does not since it doesn't implement a C formatter. I'm also not sure something like that is even needed for outputting C. The Zig compiler's C backend just appends text to some buffers. You could probably find useful parts to copy from there to get started. |
Beta Was this translation helpful? Give feedback.
The Zig's C backend doesn't seem to be usable for non-mangled output.
From my limited understanding so far, I believe their formatter functions are what mangle the resulting symbols.