Skip to content

Repository files navigation

Java2V licencevlangpatreon

Java2V Transpiler (J2V) provides the ability to transpile Java source into human-readable V that can be compiled using V's C, or Javascript backends. A subset of the Java Class Library (See docs) is also implemented for use.

Example

Input:

publicstaticvoidmain(String[] args) {
Filefile = newFile("data.txt");
System.out.println("File name: " + file.getName());
List<String> content = Files.readAllLines(file.toPath());
for (Stringline : content) {
System.out.println(line);
}
}

Output:

fnmain() {
mutfile:= io.file("data.txt")
println("File name: "+ file.get_name())
mutcontent:= nio.read_all_lines(file.to_path())
formut line in content {
println(line)
}
}

Repo Structure

There are two modules in this repository.

  • jcl/ - Classes from the Java Class Library reimplemented in V.
  • src/ - Main transpiler source.

About

A Java to V translator/transpiler.

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages