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

Commit a0faccc

Browse files
committed
Repo Update
- update documentation
1 parent 380dee3 commit a0faccc

File tree

9 files changed

+3800
-793
lines changed

9 files changed

+3800
-793
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,7 @@ bin/projects/*
8888
!bin/projects/.gitkeep
8989
checkpoint.zip
9090
_checkpoint.cmd
91+
bin/run_unittests.cmd
92+
bin/results.txt
93+
_distro.cmd
94+
pack.yml

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
**Modern Pascal • C Performance**
88

9-
*Write elegant Object Pascal, compile to blazing-fast native code*
9+
*Write elegant NitroPascal, compile to blazing-fast native code*
1010

1111
[Website](https://nitropascal.org)[Documentation](#-documentation)[Examples](#-quick-example)[Contributing](#-contributing)
1212

@@ -36,7 +36,7 @@ NitroPascal is a next-generation Pascal implementation that bridges the elegance
3636

3737
## 🔥 What Makes It Special?
3838

39-
NitroPascal takes a revolutionary approach to achieving C-level performance: **transpilation**. Instead of interpreting or compiling directly to bytecode, NitroPascal transpiles modern Object Pascal code into highly optimized, idiomatic C++. This intermediate C++ representation is then compiled using **Zig as a drop-in C++ compiler**, with the entire build orchestrated through **build.zig**, unlocking:
39+
NitroPascal takes a revolutionary approach to achieving C-level performance: **transpilation**. Instead of interpreting or compiling directly to bytecode, NitroPascal transpiles modern NitroPascal code into highly optimized, idiomatic C++. This intermediate C++ representation is then compiled using **Zig as a drop-in C++ compiler**, with the entire build orchestrated through **build.zig**, unlocking:
4040

4141
- 🎯 **Multi-Target Compilation**: Generate native binaries for Windows, Linux, macOS, and beyond
4242
-**Aggressive Optimization**: Leverage decades of C++ compiler optimization research through Zig's LLVM backend
@@ -52,13 +52,13 @@ NitroPascal's compilation pipeline transforms your Pascal code through multiple
5252

5353
```
5454
┌─────────────────┐
55-
Object Pascal │ Write clean, modern Pascal code
55+
NitroPascal │ Write clean, modern Pascal code
5656
│ Source │
5757
└────────┬────────┘
5858
5959
6060
┌─────────────────┐
61-
│ NitroPascal │ Parse and analyze with DelphiAST
61+
│ NitroPascal │ Parse and analyze with custom parser
6262
│ Transpiler │
6363
└────────┬────────┘
6464
@@ -87,22 +87,27 @@ See how elegant Pascal code transforms into optimized C++:
8787

8888
<table>
8989
<tr>
90-
<th>Object Pascal Source</th>
90+
<th>NitroPascal Source</th>
9191
<th>Generated C++ Code</th>
9292
</tr>
9393
<tr>
9494
<td>
9595

9696
```pascal
97+
$optimize "debug"
98+
9799
program HelloWorld;
98100
99-
procedure Greet(const AName: string);
101+
extern <stdio.h> routine printf(format: ^char; ...): int;
102+
103+
routine Greet(name: ^char);
100104
begin
101-
WriteLn('Hello, ' + AName + '!');
105+
printf("Hello, %s!\n", name);
102106
end;
103107
104108
begin
105-
Greet('NitroPascal');
109+
Greet("NitroPascal");
110+
ExitCode := 0;
106111
end.
107112
```
108113

@@ -111,13 +116,10 @@ end.
111116

112117
```cpp
113118
// Optimized C++ output
114-
#include <iostream>
115-
#include <string>
119+
#include <stdio.h>
116120

117-
void Greet(const std::string& name) {
118-
std::cout << "Hello, "
119-
<< name
120-
<< "!\n";
121+
void Greet(const char* name) {
122+
printf("Hello, %s!\n", name);
121123
}
122124

123125
int main() {
@@ -143,7 +145,7 @@ Pascal has always been celebrated for its clarity and strong typing, making it a
143145
144146
### Language & Syntax
145147
- 🎨 **Clean, expressive syntax** that doesn't compromise on power
146-
- 📝 **Modern Object Pascal** with contemporary language features
148+
- 📝 **Modern Pascal syntax** with contemporary language features
147149
- 🔒 **Memory safety** through strong typing without garbage collection overhead
148150
149151
### Performance & Optimization
@@ -205,7 +207,6 @@ This means you can use NitroPascal to build both open-source and proprietary app
205207
206208
NitroPascal builds upon excellent open-source projects:
207209
208-
- **[DelphiAST](https://github.com/RomanYankovsky/DelphiAST)** - Pascal AST parser
209210
- **[LLVM](https://github.com/llvm/llvm-project)** - Compiler infrastructure
210211
- **[Zig](https://github.com/ziglang/zig)** - Programming language and toolchain
211212

THIRD-PARTY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ NitroPascal is built on the shoulders of these excellent open-source projects. W
66

77
| Library | Description | Repository |
88
|---------|-------------|------------|
9-
| **DelphiAST** | An abstract syntax tree builder for Delphi/Object Pascal | [GitHub](https://github.com/RomanYankovsky/DelphiAST) |
109
| **LLVM** | The LLVM Compiler Infrastructure - modular and reusable compiler and toolchain technologies | [GitHub](https://github.com/llvm/llvm-project) |
1110
| **Zig** | A general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software | [GitHub](https://github.com/ziglang/zig) |
1211

0 commit comments

Comments
 (0)