Skip to content

Releases: dzxpert/Chkoupi-lang

Release v0.6.0

Choose a tag to compare

@github-actions github-actions released this 29 Jun 10:06
13d850a

Chkoupi-lang: VSCode Support, Structs, Methods, Manual Memory & JIT REPL

This release introduces object-oriented programming, manual memory management, and interactive JIT evaluation:

1. Structs (9aleb) & Member Methods

  • Structs (suggested by @not1cyyy): Declare custom data structures with fields, default values, and method definitions.
  • Had Instance Pointer: Access current object fields and methods using the implicit had pointer.
  • Member Actions: Support for member access (obj.field), assignments (obj.field = val), and method calls (obj.method()).

2. Manual Memory Management & Destructors (kssr)

  • Heap Deallocation: Manually free arrays, strings, and structs via the kssr statement.
  • Destructors: Defining a dalla kssr() method on a struct automatically registers it as a destructor, executing prior to heap cleanup.

3. Interactive JIT REPL Mode & VS Code Integration

  • JIT REPL: Launching chkoupi with no arguments starts an interactive shell with multi-line brace-matching, comment tracking, and variable/definition propagation.
  • VS Code Installer: A compiled chkoupi-vscode-installer.exe that embeds and registers the syntax highlighting extension in a single click.

Full Changelog: PR #4

Development Build

Development Build Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 27 May 10:29

What's Changed

  • Enhance compiler with CI, new types, coercion, and documentation by @dzxpert in #3

Full Changelog: v0.5.0...dev-build

v0.5.0

Choose a tag to compare

@dzxpert dzxpert released this 19 Jun 12:01

Chkoupi-lang: New Language Features

This release introduces several key enhancements to the Chkoupi-lang syntax and type system:

1. First-Class Arrays (jadwl) & Strings (nass)

  • Arrays: Added support for array declaration, array literals, and element indexing/assignment.
  • Strings: Native support for string types, string literals, and concatenation.
  • Characters: Added CharLitExpr support for working with individual character literals.

2. Loop Control

  • Break (a7bss): Aborts the loop execution immediately.
  • Continue (kml): Skips the current iteration and jumps directly to the next loop cycle.

3. Type Coercion & Function Inference

  • Type Coercion: Implemented automatic promotion of integers to floats when necessary (implicit coercion).
  • Return Type Inference: The compiler can now automatically infer the return type of functions from their bodies.

Full Changelog: PR #3

Chkoupi-lang v0.1.0

Choose a tag to compare

@dzxpert dzxpert released this 23 Mar 21:46

Usage

# Run a .dz file directly
chkoupi.exe myfile.dz

# Print LLVM IR
chkoupi.exe myfile.dz --emit-ir

# Compile to object file
chkoupi.exe myfile.dz --emit-obj out.o

Example

Save this as BRI.dz:

dalla greet(n: tabi3i) -> fargh {
    idha (n > 0) {
        ektb("ana a chef!\n");
    } idha_mknch {
        ektb("wlh ma ana a chef\n");
    }
}

dir x : tabi3i = 0;
ektb("hatli 5obzi: ");
a9ra(x);
greet(x);

Then run:

chkoupi.exe BRI.dz

📖 Docs

See DOCS.md for the full language reference.