Skip to content
This repository was archived by the owner on Aug 18, 2025. It is now read-only.

v0.4.4

Choose a tag to compare

@HelloAIXIAOJI HelloAIXIAOJI released this 25 Jul 15:48
· 892 commits to master since this release

Here's the bilingual update log with English above Chinese:

[v0.4.4] - 2025-07-25

🐛 Critical Fix: Nested Namespace Resolution

  • Fixed nested namespace syntax parsing: Resolved parsing issues for nested namespace calls like parent::child::add(30, 40)
    • Fixed "expected ';' but got '::'" parsing error
    • Supports arbitrary depth namespace nesting (e.g. level1::level2::level3::function())
    • Improved :: operator handling in expression parser

✨ Feature Enhancements

  • Improved namespace path resolution: Refactored namespace handling in expression parser
    • Optimized multi-level :: operator parsing flow
    • Enhanced recognition accuracy for namespace function calls
    • Supports nested namespace calls in complex expressions

🔧 Technical Improvements

  • Expression parser optimization: Improved parsing logic in src/parser/expression_parser.rs
    • Refactored :: handling in parse_primary_expression method
    • Optimized namespace path construction algorithm
    • Enhanced parser error handling capabilities

📝 Fixed Syntax Support

// These syntaxes can now be correctly parsed and executed
ns parent {
    ns child {
        fn add(a : int, b : int) : int {
            return a + b;
        };
    };
};

fn main() : int {
    // Nested namespace function call
    sum : int = parent::child::add(30, 40);
    
    // Nested namespace import
    using ns parent::child;
    result : int = add(10, 20);
    
    return 0;
};

🎯 Compatibility

  • Fully backward compatible: No impact on existing single-level namespace functionality
  • Test verification: Passed various nested scenario test cases

[v0.4.4] - 2025-07-25

🐛 重要修复:嵌套命名空间解析

  • 修复嵌套命名空间语法解析错误: 解决了 parent::child::add(30, 40) 等嵌套命名空间调用的解析问题
    • 修复了"期望 ';', 但得到了 '::'"的解析错误
    • 支持任意深度的命名空间嵌套(如 level1::level2::level3::function()
    • 完善了表达式解析器中的 :: 操作符处理逻辑

✨ 功能增强

  • 改进命名空间路径解析: 重构了表达式解析器的命名空间处理机制
    • 优化了多层 :: 操作符的解析流程
    • 增强了命名空间函数调用的识别准确性
    • 支持在复杂表达式中使用嵌套命名空间调用

🔧 技术改进

  • 表达式解析器优化: 改进了 src/parser/expression_parser.rs 中的解析逻辑
    • 重构了 parse_primary_expression 方法的 :: 处理部分
    • 优化了命名空间路径构建算法
    • 提升了解析器的错误处理能力

📝 修复的语法支持

// 现在这些语法都能正确解析和执行
ns parent {
    ns child {
        fn add(a : int, b : int) : int {
            return a + b;
        };
    };
};

fn main() : int {
    // 嵌套命名空间函数调用
    sum : int = parent::child::add(30, 40);
    
    // 嵌套命名空间导入
    using ns parent::child;
    result : int = add(10, 20);
    
    return 0;
};

🎯 兼容性

  • 完全向后兼容: 不影响现有的单层命名空间功能
  • 测试验证: 通过了多种嵌套场景的测试用例

Full Changelog: CodeNothingCommunity/CodeNothing@v0.4.3...v0.4.4