Skip to content

droptheplot/yal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yal

Yet another Lisp transpiler to Go source code.

GoDoc Go Report Card

Usage

git clone https://github.com/droptheplot/yal
cd yal
go build
./yal -path hello.yal

Example

input.yal

(package "main")

(import "fmt")

(func main () ()
  (fmt.Println (mul 2 3)))

(func mul ((a int) (b int)) (int)
  (* a b))

output.go

package main

import "fmt"

func main() {
  fmt.Println(mul(2, 3))
}

func mul(a int, b int) int {
  return a * b
}

Disclaimer

This is a fun project and is not meant to be used anywhere.

Features

  • Declarations (func, var, package, import)
  • Arithmetics (+, -, *, /, %)
  • Comparisons (<, >, <=, >=, ==, !=)
  • Boolean operators (&&, ||)
  • Slice operations (map)
  • Control flow statements (if, switch, return)

About

Yet another Lisp transpiler to Go source code

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages