Skip to content

项目推荐 | 小型脚本语言Toy #2899

@XZirui

Description

@XZirui

推荐项目

  • 类别:C
  • 项目标题:Toy 编程语言是一种命令式、字节码解释的可嵌入脚本语言。
  • 项目描述:这个语言允许主机的开发人员和最终用户通过文本文件公开程序逻辑来实现直接自定义。
  • 亮点:

    • 简单的类 C/类 JS 语法
    • 中间 AST 表示
    • 强大但可选的类型系统
    • 函数和闭包
    • 可使用可导入的本机代码进行扩展
    • 可以重定向输出、错误和断言失败消息
    • Zlib 许可证下的开源
  • 示例代码:

//fizzbuzz example
for (var counter: int = 1; counter <= 100; i++) {
	var result: string = "";

	if (counter % 3 == 0) {
		result = result .. "fizz";
	}

	if (counter % 5 == 0) {
		result = result .. "buzz";
	}

	if (result != "") {
		print result;
	}
	else {
		print counter;
	}
}
  • 截图:无

  • 后续更新计划:

Feature Time Span Review Date
Arrays & Tables - 1st Jan ✅
Control Flow 2 weeks 15th Jan ✅
Functions* 2 weeks 29th Jan
Functions 2 weeks 12th Feb
Dot Operator & Slices 2 weeks 26th Feb
Native Libraries 2 weeks 12th Mar
Standard Libraries 2 weeks 26th Mar
Documentation - -

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions