Skip to content

Tags: tinyBigGAMES/JetPascal

Tags

0.2.0

Toggle 0.2.0's commit message
Release v0.2.0: Breaking Down the Wall Between Pascal and C++

JetPascal v0.2.0 delivers the transpiler that Pascal developers have been waiting for: seamless C++ ecosystem integration with zero friction, no wrappers, no FFI overhead. Write clean Pascal code while directly accessing the entire C++ universe through smart token mixing, unrestricted C++ blocks, and static library linking.

KEY MILESTONE:
JetPascal breaks down the traditional barrier between Pascal and C++. Mix Pascal and C++ freely in the same source file. Include C++ headers directly. Link static libraries with a single directive. Access 40+ years of C++ libraries without writing a single line of wrapper code.

SEAMLESS C++ INTEGRATION - THE KILLER FEATURE:
- Unknown token passthrough (any non-Pascal token = C++)
- Direct header inclusion (#include_header '<vector>', '"raylib.h"')
- Unrestricted C++ blocks (#startcpp/#endcpp)
- C++ expressions in Pascal code (WriteLn('Result: ', std::sqrt(16.0)))
- Static library linking (#link 'raylib')
- Zero-overhead abstraction
- No FFI layer, no marshaling, no binding maintenance
- "Living in C++" philosophy

COMPLETE PASCAL LANGUAGE:
- All fundamental types: Integer, Int64, UInt64, Cardinal, Word, Byte, Boolean, Char, Single, Double, String
- Full pointer support: New, Dispose, GetMem, FreeMem, ReallocMem, AllocMem, pointer arithmetic
- Static arrays: arbitrary bounds including negative indices, multi-dimensional
- Records: structured types mapping directly to C++ structs
- Enumerations: named constant sets
- Complete control flow: if/then/else, for/to/downto, while/do, repeat/until, break, continue
- Functions & procedures: nested routines, const/var/out parameters
- Exception handling: try/except/finally with RaiseException
- Units: modular programming with interface/implementation
- Type aliases and custom type definitions
- True Delphi semantics preserved

COMPREHENSIVE SYSTEM FUNCTIONS:
- Memory management: New, Dispose, GetMem, FreeMem, ReallocMem, AllocMem, SizeOf
- I/O operations: WriteLn, Write (supports multiple arguments, C++ expressions)
- Ordinal functions: Ord, Inc, Dec
- Command line: ParamCount, ParamStr
- Exception handling: RaiseException, GetExceptionMessage
- All with natural Pascal syntax

UNIT TESTING FRAMEWORK:
- Built-in unit test support (#unittestmode on)
- Test block syntax with descriptive names
- Assertion functions: AssertEqual, Assert
- Integrated test execution
- Clean test organization
- Professional testing workflow

COMPILER DIRECTIVES - TOTAL BUILD CONTROL:
- Optimization levels: debug, releasesafe, releasefast, releasesmall
- Cross-platform targets: native, x86_64-windows, x86_64-linux, aarch64-macos, aarch64-linux, wasm32-wasi
- Application types: console, gui
- Path configuration: #unit_path, #include_path, #library_path
- Library linking: #link directive for static linking
- Header inclusion: #include_header for C/C++ headers
- ABI control: #abi c or cpp
- Full C++ preprocessor: #define, #ifdef, #if, #else, #endif, #ifndef, #undef
- Everything configured in Pascal source - no external build files

C++ OPERATORS SUPPORT:
- Compound assignment: +=, -=, *=, /=
- Increment/decrement: ++, -- (prefix and postfix)
- Bitwise operations: &, |, ^, ~, <<, >>
- Native C++ operator integration
- Natural mixed-mode expressions

SMART TOKEN ARCHITECTURE:
- Revolutionary self-contained token system
- 100+ registered smart tokens
- Each token handles its own parsing and code emission
- Factory pattern for extensibility
- "Just works" principle - new features integrate automatically
- Minimal core compiler (150-200 lines)
- Polymorphic dispatch for maintainability

ZIG BUILD SYSTEM INTEGRATION:
- Self-contained toolchain - no external dependencies
- Cross-compilation with zero configuration
- Latest Clang/LLVM compiler
- Modern C++23 code generation
- Optimized compilation pipeline
- Everything ships in the box

CROSS-PLATFORM SUPPORT:
- Windows (x86_64)
- Linux (x86_64, aarch64)
- macOS (aarch64 - Apple Silicon)
- WebAssembly (experimental)
- Single codebase, multiple targets
- Zero platform-specific code needed

CODE GENERATION FEATURES:
- Clean, readable C++23 output
- Proper #line directives for debugging
- Source position tracking
- Error messages map to Pascal source
- Debugger shows Pascal line numbers
- Professional development experience

REAL-WORLD DEMONSTRATION:
- Raylib integration example (static linking)
- Complete game window in ~20 lines
- Zero wrapper code required
- Single executable output
- Production-ready example included

This release proves JetPascal's core vision: seamless Pascal/C++ ecosystem interop. With direct header inclusion, static library linking, unrestricted C++ blocks, and unknown token passthrough, you can access the entire C++ universe from clean Pascal code.

THE BREAKTHROUGH:
JetPascal isn't just another Pascal compiler - it's the bridge between Pascal's clarity and C++'s ecosystem. Write Pascal syntax. Include C++ headers. Link C++ libraries. Mix freely in the same source. No wrappers. No bindings. No friction.

Write Pascal. Access C++. Ship everywhere.

Version: 0.2.0

0.1.0

Toggle 0.1.0's commit message
Repo Update

Initial commit - JetPascal v0.1.0

JetPascal is a Pascal-to-C++ transpiler written in Delphi that accelerates
Pascal code by transpiling to C++ and compiling with Zig. Includes:

- Complete Pascal parser built on DelphiAST
- Transpiler engine converting Pascal AST to C++/header pairs
- Build system integration with Zig toolchain
- Support for programs, units, and libraries
- Control structures (if/for/while/repeat/case/try/with)
- Memory management (New/Dispose/GetMem/FreeMem/ReallocMem)
- Built-in functions (WriteLn, ParamStr, Inc/Dec, array/set operations)
- Type system (records, arrays, enums, constants, primitives)
- Exception handling with try/except/finally blocks
- Project initialization and template generation