Latte is a readable, flexible, simple and extensive JVM programming language. It's 100% interoperable with Java.
Please visit the Document for more features
Latte only requires JDK 1.6
, and also supports JDK 9
.
The project is managed by Gradle, and a build script is provided.
clone the repository, and run ./build.py
.
run ./latte
, and REPL will launch
You can compile latte source codes or run latte scripts with the help of latte-gradle-plugin.
Click here for more info
Latte provides an REPL, you can run the jar generated via automatic building, or execute lt.repl.REPL
class directly.
Besides the importings of Latte, the REPL also imports :
lt::util::_
java::util::_
java::math::_
lt::repl::_
If Latte source files (*.lt
) are to be compiled, you can enter the REPL mode and use Compiler()
to construct a lt::repl::Compiler
object. You can compile lt
files in similar way in java.
compiler = Compiler()
compiler + 'class-path'
compiler >> 'output directory'
compiler compile filesInDirectory('source file directory', '.*\\.lt'.r)
// or you can chain these invocations up
Compiler() + 'class-path' >> 'output dir' compile filesInDirectory('source file directory', '.*\\.lt'.r)