Programming language (that doesn't really exists) that compiles to Go binary.
NOTE: Currently in experimental stage! Needs to have a real parser and lexer. Currently it just uses the dumb find-replace method to translate the code to a valid Go source code.
- It just removes curly-braces
{
and}
to declare aninterface
,struct
,func
, if-else, for-loop, and switch-statement and closes it withend
keyword. - It just removes the
type
keyword to declare aninterface
andstruct
. - It just replaces
func
keyword tofun
to declare a function. - Then everything is just Go ^_^
hello.gone
file
package main
import "fmt"
fun main()
c := make(chan string)
go fun()
c <- "Hello, Gohan"
end()
fmt.Println(<-c)
end
Then execute the command below to create Go binary hello
or hello.exe
(based on your platform).
gone hello.gone
-> hello
Then execute the application:
./hello
-> Hello, Gohan
The MIT License (MIT)
Copyright (c) 2015 Maiah Macariola