This repository was archived by the owner on Aug 18, 2025. It is now read-only.
v0.2.6
CodeNothing Programming Language Interpreter v0.2.6 Changelog
[v0.2.6] - 2025-07-20
New Features
Exception Handling
Added complete exception handling mechanism with:
- try-catch statements:
try { // Code that may throw exceptions } catch (exception : Exception) { // Exception handling }; - try-catch-finally statements:
try { // Code that may throw exceptions } catch (exception : Exception) { // Exception handling } finally { // Cleanup code (always executes) }; - throw statements:
throw "Error message"; throw someVariable; - Supports nested try-catch structures
- Exceptions propagate up the call stack until caught
- Supports type declaration for exception variables (Exception type)
Optimizations
Code Structure
- Split
src\parser\mod.rsandsrc\interpreter\mod.rsfor better modularity
Time Library Improvements
- Updated
sleep_secondsandsleepto support floating-point parameters:sleep_seconds(0.2)now works correctly (200ms)sleep(0.5)now works correctly (0.5ms)
- Added
sleep_microseconds()for microsecond-level delays - Now uses nanosecond precision for more accurate timing
Namespace Improvements
- Fixed and optimized namespace prefix calling mechanism
using ns xxx;can now be used in any scope (function body, code blocks)- Only affects unprefixed calls in current scope and child scopes
- Does not affect prefixed calls (e.g.,
math::add(...))
CodeNothing 编程语言解释器 v0.2.6 更新日志
[v0.2.6] - 2025-07-20
新增功能
异常处理机制
新增完整的异常处理支持:
- try-catch 语句:
try { // 可能抛出异常的代码 } catch (exception : Exception) { // 异常处理代码 }; - try-catch-finally 语句:
try { // 可能抛出异常的代码 } catch (exception : Exception) { // 异常处理代码 } finally { // 总是执行的清理代码 }; - throw 语句:
throw "异常信息"; throw someVariable; - 支持嵌套的 try-catch 结构
- 异常会在函数调用栈中向上传播,直到被捕获
- 支持异常变量的类型声明(Exception 类型)
优化改进
代码结构
- 拆分
src\parser\mod.rs和src\interpreter\mod.rs以提高模块化程度
时间库优化
- 更新
sleep_seconds和sleep支持浮点数参数:sleep_seconds(0.2)现在可以正常工作(200 毫秒)sleep(0.5)现在可以正常工作(0.5 毫秒)
- 新增
sleep_microseconds()支持微秒级延时 - 使用纳秒级精度,提供更精确的延时控制
命名空间优化
- 修复并优化命名空间前缀调用机制
using ns xxx;现在可以在任意作用域(函数体、代码块)中使用:- 只影响当前作用域及其子作用域的无前缀调用
- 不影响带前缀调用(如
math::add(...))
Installation Guide
Download Steps
- Download the following two packages for your operating system:
- Interpreter main package (
codenothing-{OS}.zip) - Standard library package (
codenothing-all-libraries-{OS}-latest.tar.gz)
- Interpreter main package (
Installation Steps
- Extract both packages
- Create a subfolder named
libraryin the interpreter's main directory - Copy all extracted library files (.dll or .so) into the newly created
libraryfolder
Usage
After completing the above steps, you can start using the CodeNothing programming language interpreter.
System Requirements
- Windows/Linux operating system
- Appropriate file extraction tools
安装指南
下载步骤
- 下载适用于您操作系统的以下两个压缩包:
- 解释器本体压缩包(
codenothing-{OS}.zip) - 标准库(library)压缩包(
codenothing-all-libraries-{OS}-latest.tar.gz)
- 解释器本体压缩包(
安装步骤
- 解压两个压缩包
- 在解释器本体文件夹中创建子文件夹:
library - 将解压出的 library 文件(.dll 或 .so)全部复制到新建的
library文件夹中
使用说明
完成上述步骤后,您就可以开始使用 CodeNothing 编程语言解释器了。
系统要求
- Windows/Linux 操作系统
- 适当的文件解压工具
Full Changelog: CodeNothingCommunity/CodeNothing@v0.2.4...v0.2.6