Skip to content

Z version 0.12 Imports and Modules - 2025-11-18

Choose a tag to compare

@Prime-Lasking Prime-Lasking released this 18 Nov 09:00
· 21 commits to main since this release
3e20ba9

馃帀 Major New Features

  • Module System with IMPORT statements - Import functions from other Z files
    • IMPORT "filename.z" statement support
    • Recursive compilation of imported modules
    • Automatic extraction and integration of non-main functions
    • Proper function naming with z_ prefix for internal linkage

馃悰 Bug Fixes

  • Fixed lexer CALL instruction parsing for space-separated return variables
  • Fixed semantic analyzer to properly handle imported function declarations
  • Fixed C code generation to include imported functions before main function
  • Resolved implicit function declaration errors during C compilation

馃摑 Documentation

  • Added IMPORT examples to README.md
  • Updated version to v0.12 across all files
  • Enhanced language overview with module system documentation

馃敡 Technical Changes

  • Enhanced codegen.py with compile_imported_file and extract_non_main_functions helpers
  • Updated semantics.py _handle_import method to register imported functions
  • Added IMPORT_ERROR to ErrorCode enum
  • Improved error handling for import failures

[0.11.5] - Previous Release

  • Windows-first release with integrated setup system
  • Single executable distribution
  • PATH management and installation features
  • Enhanced error handling and validation
  • Performance optimizations and robustness improvements