praeclarum / Gone

GO compiler for .NET
43 stars 3 forks source link

Gone

Language: F# Language: C# Language: Go

Gone is the GO compiler for .NET.

Come watch it being built: https://twitch.tv/FrankKrueger

Goal

Build a compiler to parse the Go Lang:

package main

import "fmt"

func main() {
    fmt.Println("Hello, 世界")
}

Building

dotnet build

Modifying the Grammar

If you modify Parser.jay, then please rebuild the parser with:

make

Output

After running the tests a file Output.dll is created on your desktop.

Create a config file - Output.runtimeconfig.json:

{
  "runtimeOptions": {
    "tfm": "netcoreapp3.1",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "3.1.0"
    }
  }
}

Then run the following command to see the compilier working:

dotnet ~/Desktop/Output.dll
Hello, 世界

Show Notes

Contact

Mostly @praeclarum.