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

v0.2.4

Pre-release
Pre-release

Choose a tag to compare

@HelloAIXIAOJI HelloAIXIAOJI released this 16 Jul 05:01
· 1120 commits to master since this release

CodeNothing Programming Language Interpreter v0.2.4 Changelog

[v0.2.4] - 2025-07-16

New Features

JSON Library

Added comprehensive JSON support with the following functions:

  • json::parse - Parse JSON strings
  • json::format - Format JSON data
  • json::create_object - Create JSON objects
  • json::create_array - Create JSON arrays
  • json::get_value - Extract values from JSON
  • json::is_valid - Validate JSON
  • json::merge - Merge JSON objects

Fixes

Issue 1: JSON String Parsing Errors

Symptom: "key must be a string at line 1 column 2" error when parsing JSON strings.

Solutions:

  • Added preprocess_json_string to handle escape characters
  • Added fix_json_string to automatically fix common JSON formatting issues
  • Added JSON extraction from HTTP responses
  • JSON strings are now parsed correctly, including from HTTP responses

Issue 2: Numeric Type Handling

Symptom: Numeric strings were treated as regular strings instead of numbers.

Solutions:

  • Added numeric type detection in cn_create_object and cn_create_array
  • Strings are now automatically converted to integers or floats when possible
  • Numeric strings are now correctly identified as JSON number types

Issue 3: Library Namespace Handling

Symptom: Hardcoded namespace handling limited extensibility.

Solutions:

  • Removed hardcoded namespace checks in the parser
  • Improved namespace function call handling
  • Removed special handling for std namespace
  • All library namespaces are now automatically recognized
  • Unified namespace function call interface for better extensibility

CodeNothing 编程语言解释器 v0.2.4 更新日志

[v0.2.4] - 2025-07-16

新增功能

JSON库

新增完整的JSON支持,包含以下功能:

  • json::parse - 解析JSON字符串
  • json::format - 格式化JSON数据
  • json::create_object - 创建JSON对象
  • json::create_array - 创建JSON数组
  • json::get_value - 从JSON中提取值
  • json::is_valid - 验证JSON有效性
  • json::merge - 合并JSON对象

修复

问题1:JSON字符串解析错误

症状: 解析JSON字符串时出现"key must be a string at line 1 column 2"错误

解决方案:

  • 新增preprocess_json_string处理转义字符
  • 新增fix_json_string自动修复常见JSON格式问题
  • 新增从HTTP响应中提取JSON功能
  • 现在可以正确解析JSON字符串,包括从HTTP响应中提取

问题2:数值类型处理问题

症状: 数字字符串被当作普通字符串处理

解决方案:

  • cn_create_objectcn_create_array中增加数字类型检测
  • 字符串现在会自动尝试转换为整数或浮点数
  • 数字字符串现在能被正确识别为JSON数值类型

问题3:库命名空间处理问题

症状: 硬编码命名空间处理限制了扩展性

解决方案:

  • 移除解析器中的硬编码命名空间检查
  • 改进命名空间函数调用处理
  • 移除对std命名空间的特殊处理
  • 现在可以自动识别所有库的命名空间
  • 统一命名空间函数调用接口,提高扩展性

Installation Guide

Download Steps

  1. 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

Installation Steps

  1. Extract both packages
  2. Create a subfolder named library in the interpreter's main directory
  3. Copy all extracted library files (.dll or .so) into the newly created library folder

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

安装指南

下载步骤

  1. 下载适用于您操作系统的以下两个压缩包:
    • 解释器本体压缩包(codenothing-{OS}.zip
    • 标准库(library)压缩包(codenothing-all-libraries-{OS}-latest.tar.gz

安装步骤

  1. 解压两个压缩包
  2. 在解释器本体文件夹中创建子文件夹:library
  3. 将解压出的 library 文件(.dll 或 .so)全部复制到新建的 library 文件夹中

使用说明

完成上述步骤后,您就可以开始使用 CodeNothing 编程语言解释器了。

系统要求

  • Windows/Linux 操作系统
  • 适当的文件解压工具

Full Changelog: CodeNothingCommunity/CodeNothing@v0.2.3...v0.2.4