r/ProgrammingLanguages • • Feb 17 '26

Language announcement Coda compiler update

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

10 Upvotes

8 comments sorted by

View all comments

Show parent comment

2

u/fuckkkkq Feb 19 '26

aha! yes, it is mostly the *? that was tripping me up. thanks for explaining!