Kinomo là ngôn ngữ lập trình chạy trên Java Virtual Machine
Download Kinomo Compiler Kinomo-Compiler-v1.0
- Build Kinomo Compiler ==> (.jar) sử dụng Maven script
mvn clean package
- Compile .ki file
first {
void main (string[] args) {
var x = 50
OutVar(x)
}
void OutVar (int param) {
echo param
}
}
- File sau khi build sẽ có tên là
compiler-1.0-SNAPSHOT-jar-with-dependencies.jar
được Maven lưu tại địa chỉ~./compiler/target/
để Compile KiCode sử dụng lệnh sau
java -jar compiler/target/compiler-1.0-SNAPSHOT-jar-with-dependencies.jar KinomoExamples/first.ki
java -cp . first
50
- Thử xem file
first.ki
sau khi biên dịch sẽ như thế nào, ở đây mình sài trình dịch ngược mặc định của IntelliJ IDEA từ ".class" về ".java"
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
public class first {
public static void main(String[] var0) {
boolean var1 = true;
OutVar(50);
}
public static void OutVar(int var0) {
System.out.println(var0);
}
}