LFGo: Lisp-Flavoured Go
(C) 2016 Kim, Taegyoon
LFGo is a programming language that transcompiles to Go. It uses Lisp-like syntax.
$ racket l++.rkt -h l++.rkt [ <option> ... ] [<filenames>] ... where <option> is one of -c, --compile : Compile only; do not run -v, --verbose : Display verbose messages -o <file> : Place the output into <file> --help, -h : Show this help -- : Do not treat any remaining argument as a switch (at this level) Multiple single-letter switches can be combined after one `-'; for example: `-h-' is the same as `-h --'
Syntax and semantics
See the source code for details.
#! end-of-line comment
#| nestable block comment
#; S-expression comment
See Reading Comments.
(import "fmt") (main (fmt.Println "Hello, World!"))
$ racket lfgo.rkt ex/hello.lfgo Hello, World!
Other examples are in the
(import "fmt") (main (for (def i 99) (>= i 1) (-- i) (fmt.Println i "bottles of beer on the wall," i "bottles of beer.") (fmt.Println "Take one down and pass it around," (- i 1) "bottle of beer on the wall.")))
Copyright 2016 Kim, Taegyoon
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.