wenyan-lang / wenyan

文言文編程語言 A programming language for the ancient Chinese.
https://wy-lang.org/
MIT License
19.64k stars 1.1k forks source link

中文函数式编程语言的探索 #661

Open UltimatePea opened 3 years ago

UltimatePea commented 3 years ago

Inspired by wenyan, I made a functional programming language following the similar style, with mixfix operators, and a virtual execution environment. The language is called 豫言, and it can be accessed at https://github.com/yuyan-lang/yuyan.

The language 豫言 is intended to be a prototype model for a commercial programming language.

sunxyz commented 2 years ago

Keywords can be redefined look https://github.com/sunxyz/rust-lisp

(
   (define 定义 define)
   (定义 定义函数 defun)
   (定义 显示 display)
   (定义 换行 newline)

   (定义函数 打印 (打印的字)
       (显示 打印的字)
       (换行)
   )

   (打印 '你好 中国')
)
=> '你好 中国'