Add token-based PEG frontend and CLI source parsing
Verify databases and deploy Aster VM / verify-and-deploy (push) Successful in 7m30s

This commit is contained in:
2026-10-19 02:48:23 +08:00
parent e24909a56e
commit 0b3a480555
36 changed files with 1146 additions and 33 deletions
+5
View File
@@ -0,0 +1,5 @@
# Frontend 源码样例
[basic.endor](basic.endor) 包含字符串函数、位置参数、let 绑定、return 与算术表达式。它展示当前能解析的源码,不表示已能编译和执行运算。
在指定远端环境使用 `cli parse crates/frontend/examples/basic.endor` 输出 AST;工作区运行方法见 [运行指南](../../../docs/operations/README.md)。syntax.rs 包含此样例的解析检查。返回 [frontend](../README.md)。
+9
View File
@@ -0,0 +1,9 @@
// Parsing produces an AST; it does not execute these functions.
function echo(text: String): String {
let result = text
return result
}
function discountedPrice(price: Number, discount: Number): Number {
return price - discount
}