【文件属性】:
文件名称:monkey-lang:用go编写的mokney编程语言(一种伪编程语言)的解释器
文件大小:39KB
文件格式:ZIP
更新时间:2021-03-14 05:04:23
Go
:monkey: 猴子郎
Monkey Lang是一种编程语言,旨在帮助您理解编程语言的幕后工作方式。 编译器当前支持函数,高阶函数,闭包,字符串,整数,数组,哈希和整数算术。
这是Thorsten Ball的《 中的帮助下。
:rocket: 入门
当前,该项目仅支持来自命令行repl的输入。
克隆存储库: git clone https://github.com/lukeomalley/go-intrepreter.git
cd go-intrepreter项目的根目录: cd go-intrepreter
启动交互式REPL: go run main.go
:writing_hand: 莫克尼码示例
声明一个变量:
let x = 5;
定义和应用功能:
let add = fn ( x , y ) {
return x + y ;
}
add ( 5 , 5 ) ; // => 10
关闭时间:
let ne
【文件预览】:
monkey-lang-master
----.gitignore(9B)
----README.md(2KB)
----lexer()
--------lexer.go(3KB)
--------lexer_test.go(3KB)
----evaluator()
--------builtins.go(3KB)
--------evaluator_test.go(11KB)
--------evaluator.go(9KB)
----code()
--------code_test.go(2KB)
--------code.go(4KB)
----token()
--------token.go(1012B)
----repl()
--------repl.go(2KB)
----compiler()
--------compiler.go(10KB)
--------compiler_test.go(19KB)
--------symbol_table.go(1KB)
--------symbol_table_test.go(3KB)
----.vscode()
--------launch.json(412B)
----parser()
--------parser.go(11KB)
--------parser_test.go(22KB)
--------parser_tracing.go(526B)
--------.DS_Store(6KB)
----vm()
--------vm.go(11KB)
--------vm_test.go(8KB)
--------frame.go(523B)
----ast()
--------ast.go(10KB)
--------ast_test.go(609B)
----object()
--------object_test.go(578B)
--------object.go(6KB)
--------environment.go(573B)
----Monkey.go(335B)