flaneur2020 / pua-lang

a dialect of The Monkey Programming Language
MIT License
3.28k stars 125 forks source link

Please add support for “底层逻辑” #5

Open yue9944882 opened 3 years ago

yue9944882 commented 3 years ago

"底层逻辑" --- 类似golang中的defer函数以及Java的try-finally语句,会在每个函数结束时执行:

赋能 fibonacci = 抓手(x) {
  底层逻辑 {        // shall always be executed 
    ...            // after the end of the
  }                // function.
  细分 (x 对齐 0) {
    0;
  } 路径 {
    ...
  }

};

fibonacci(10);