This repository was archived by the owner on Aug 18, 2025. It is now read-only.
  
  
  
  
    
    
    
      
    
  
  
    
File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 11# CodeNothing 更新日志  
22
3+ ## [ v0.4.4]  - 2025-07-25 
4+ ### 🐛 重要修复:嵌套命名空间解析  
5+ -  ** 修复嵌套命名空间语法解析错误** : 解决了 ` parent::child::add(30, 40) `  等嵌套命名空间调用的解析问题
6+   -  修复了"期望 ';', 但得到了 '::'"的解析错误
7+   -  支持任意深度的命名空间嵌套(如 ` level1::level2::level3::function() ` )
8+   -  完善了表达式解析器中的 ` :: `  操作符处理逻辑
9+ 
10+ ### ✨ 功能增强  
11+ -  ** 改进命名空间路径解析** : 重构了表达式解析器的命名空间处理机制
12+   -  优化了多层 ` :: `  操作符的解析流程
13+   -  增强了命名空间函数调用的识别准确性
14+   -  支持在复杂表达式中使用嵌套命名空间调用
15+ 
16+ ### 🔧 技术改进  
17+ -  ** 表达式解析器优化** : 改进了 ` src/parser/expression_parser.rs `  中的解析逻辑
18+   -  重构了 ` parse_primary_expression `  方法的 ` :: `  处理部分
19+   -  优化了命名空间路径构建算法
20+   -  提升了解析器的错误处理能力
21+ 
22+ ### 📝 修复的语法支持  
23+ ``` cn 
24+ // 现在这些语法都能正确解析和执行 
25+ ns parent { 
26+     ns child { 
27+         fn add(a : int, b : int) : int { 
28+             return a + b; 
29+         }; 
30+     }; 
31+ }; 
32+ 
33+ fn main() : int { 
34+     // 嵌套命名空间函数调用 
35+     sum : int = parent::child::add(30, 40); 
36+      
37+     // 嵌套命名空间导入 
38+     using ns parent::child; 
39+     result : int = add(10, 20); 
40+      
41+     return 0; 
42+ }; 
43+ ``` 
44+ 
45+ ### 🎯 兼容性  
46+ -  ** 完全向后兼容** : 不影响现有的单层命名空间功能
47+ -  ** 测试验证** : 通过了多种嵌套场景的测试用例
48+ 
349## [ v0.4.3]  - 2025-07-25 
450### 🚀 重大新功能:Switch 模式匹配扩展  
551-  ** 范围匹配支持** : 添加 ` case 1..10 `  语法支持范围匹配
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments