C transpiler prototype written in go! don’t expect it to be working well, it’s very much incomplete and is missing a lot of stuff, but feel free to contribute.




the tokenizer and parser were mostly inspired by Blaise by the creator of the odin language

Basic Example

package main

// The foreign keyword is used before an import to specify that the import contains C code
foreign import "stdio.h"
foreign import "stdlib.h"

// The def keyword is used to define a new type
def Foo string
def Bar int

// structs...
def FooBar struct {
 // name type
    Foo: string
    Bar: int

def BarFoo struct {
    Foo: FooBar

func main(argv: string) {}
      // name type              return type
func foo(foo: FooBar, bar: FooBar) FooBar {}
func bar(bar: BarFoo) {}


View Github