Skip to content

Latest commit

 

History

History
161 lines (116 loc) · 1.63 KB

File metadata and controls

161 lines (116 loc) · 1.63 KB
  1. ✅support assign expression
var a = 1;
a = 2;

var b = 3;

a = b = 4;

var c = 5;

c = a;
  1. ✅support function params LOAD and STORE
func add(a, b){
    print(a + b);
}

add:
  LOAD #0
  LOAD #1
  ADD
  CALL print

3.✅support global variable LOAD and STORE

var a = 1;

func main(){
    print(a);
}

func main(){
    var a = 2;
    print(a);
}

func show(a){
    print(a);
}

4.✅ support function return

func add(a, b){
    return a + b;
}

5.✅ support if and while statement

if(a > 1){

}else{

}

while(a < 100){
    print(a);
    a = a + 1;
}
  1. ✅ support include
include("std");

func main(){
    stdFunction();
}
  1. ✅ support comment
include("std");

// Single-line comment:

/*
multi-line comment
*/
func main(){
    stdFunction();
}
  1. ✅ support access.
func main(){
    var a = {"name":"lily"};
    print(a.name);
}
  1. ✅ remove register
  • remove ei register
  • remove cvalues register
  1. ✅ support access functin type member
func k(a){
    print("k");
    print(a);
}
func main(){
    var a = {"name":"lily", "action": k};
    a.k(10);
}
  1. ✅ for member functio, support this keyword.
func k(a){
    print(a);
    print(this.name);
}
func main(){
    var a = {"name":"lily", "action": k};
    a.k(10);
}
  1. 📌 recycle include and include twice.
include("std");
include("std"); // error!
// Single-line comment:

/*
multi-line comment
*/
func main(){
    stdFunction();
}
  1. ✅ Garbage Collection

  2. ✅ Reference Type Refactoring

  3. 📌 Error Reporting Optimization

  4. 📌 Debugger Support