迷你解释器:一种简单的脚本语言

时间:2021-01-31 13:50:41
【文件属性】:
文件名称:迷你解释器:一种简单的脚本语言
文件大小:29KB
文件格式:ZIP
更新时间:2021-01-31 13:50:41
golang interpreter compiler stone CompilerGo 结石 基于Golang的脚本语言 规范 种类 comments Comments are ignored by the interpreter // ... int The set of all signed 32-bit integers (-2147483648 to 2147483647) i = 123 string A string type represents the set of string values s = "HelloWorld" function A function type denotes the set of all functions with the same parameter and result types The return value is the result of the last statement add = func(a, b) { a + b } [ Anonymous function ] def max (a, b) {
【文件预览】:
mini-interpreter-master
----environment()
--------nested_env.go(857B)
--------native_env.go(1KB)
--------native_function.go(618B)
--------environment.go(217B)
----vm()
--------heap_memory.go(103B)
--------vm.go(6KB)
--------op_code.go(1KB)
----ast()
--------null_stmnt.go(319B)
--------class_body.go(320B)
--------ast_leaf.go(732B)
--------vm_function.go(353B)
--------array_ref.go(701B)
--------name.go(439B)
--------if_stmnt.go(978B)
--------dot.go(963B)
--------op.go(135B)
--------arguments.go(1KB)
--------number_literal.go(396B)
--------func.go(607B)
--------def_stmnt.go(777B)
--------string_literal.go(398B)
--------negative_expr.go(550B)
--------stone_object.go(671B)
--------array_literal.go(469B)
--------binary_expr.go(3KB)
--------function.go(672B)
--------class_stmnt.go(795B)
--------primary.go(979B)
--------parameter_list.go(575B)
--------block_stmnt.go(413B)
--------ast_list.go(864B)
--------class_info.go(795B)
--------ast.go(238B)
--------while_stmnt.go(774B)
----test(1KB)
----lexer()
--------lexer.go(2KB)
--------lexer_test.go(338B)
--------lexer_test(186B)
----main.go(567B)
----.gitignore(12B)
----token()
--------token.go(661B)
--------num_token.go(374B)
--------str_token.go(278B)
--------id_token.go(276B)
----README.md(3KB)
----parser()
--------parser.go(11KB)
--------parser_test(506B)
--------parser_test.go(605B)
--------eval_test(979B)

网友评论