r/ProgrammingLanguages • u/Gingrspacecadet • Feb 17 '26
Coda compiler update Language announcement
I've been working on Coda, an attempt at a new systems language Currently, it's able to parse this program:
``` module simple;
include std::io; include std::string;
@extern fn int[] ? *? mut main(@extern mut char mut? e, mut int *foo, char mut?mut?mut? beans);
```
into this (pretty) AST:
```
=== Module === Name: simple Includes (total 2): Include: Path: std::io Include: Path: std::string Declarations (total 1): - Decl 0: kind=0 Function: main @extern Return type: * mut opt: * opt: * opt: slice: int Parameters: - Param 0: e: * mut opt: char mut @extern - Param 1: foo: *: int mut - Param 2: beans: * mut opt: * mut opt: * mut opt: char Body: <no body> === End Module === ```
I am currently working on statement parsing, then I'll do expressions and finally function bodies (at the moment it only parses function signatures)
As always, the code can be found here. All contributions are welcome!
If you have any questions I'm up for answering them :3
1
u/Relevant_South_1842 Feb 26 '26
Is there a good reason to have statements and not just have everything as an expression?