diff --git a/.lingma/rules/project_rule.md b/.lingma/rules/project_rule.md new file mode 100644 index 0000000..aea8af4 --- /dev/null +++ b/.lingma/rules/project_rule.md @@ -0,0 +1,2 @@ +**添加规则文件可帮助模型精准理解你的编码偏好,如框架、代码风格等** +**规则文件只对当前工程生效,单文件限制10000字符。如果无需将该文件提交到远程 Git 仓库,请将其添加到 .gitignore** \ No newline at end of file diff --git a/docs/Snow-Lang-Syntax/Snow-Lang-Grammar-Specification.md.md b/docs/Snow-Lang-Syntax/Snow-Lang-Grammar-Specification.md.md index 495d43b..a60b3fd 100644 --- a/docs/Snow-Lang-Syntax/Snow-Lang-Grammar-Specification.md.md +++ b/docs/Snow-Lang-Syntax/Snow-Lang-Grammar-Specification.md.md @@ -421,8 +421,8 @@ declare a: Point = Point(1, 2) ## 9 · 错误分类 -| 编译期错误代码 | 产生条件 | -| ---------------------- | -------------------------- | +| 编译期错误代码 | 产生条件 | +|----------------------|----------------------------| | DuplicateName | 违反唯一性规则;结构体内有参数签名完全相同的构造函数 | | UnresolvedIdentifier | 名字无法解析 | | ReturnMissing | 非 void 函数缺少 return | @@ -430,7 +430,7 @@ declare a: Point = Point(1, 2) | ImportCycle | (可选)检测到循环依赖 | | CtorAmbiguous | 构造函数重载时参数匹配不唯一 | | CtorNotFound | 构造函数重载时无匹配参数签名 | -|AccessDenied | 访问了以 `_` 开头的私有变量或方法但不在允许范围| +| AccessDenied | 访问了以 `_` 开头的私有变量或方法但不在允许范围 | --- @@ -517,10 +517,10 @@ module: RectExample function: main returns: int - declare rect1: Rectangle = Rectangle(0, 0, 10, 10) - declare rect2: Rectangle = Rectangle(5, 6) - declare result: int = 0 body: + declare rect1: Rectangle = Rectangle(0, 0, 10, 10) + declare rect2: Rectangle = Rectangle(5, 6) + declare result: int = 0 if rect1.area() > 50 then loop: init: