Skip to content

Commit ce016dd

Browse files
committed
docs: Add initial language specification, roadmap, standard library, and extension README.
1 parent 568ab31 commit ce016dd

4 files changed

Lines changed: 144 additions & 55 deletions

File tree

docs/language-spec/LANGUAGE_SPEC.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ProXPL Language Specification
22

3-
**Version: 0.1.0**
3+
**Version: 0.4.0**
44
**Last Updated: December 2024**
55

66
---

docs/roadmap/PHASE_PLAN.md

Lines changed: 60 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,62 @@
11
# ProXPL Modernization Phase Plan
22

3-
This document consolidates the modernization roadmap into phases aligned with the project's goals.
4-
5-
Phase A - Core Runtime
6-
- Design IR and opcode set (docs/ir/opcodes.md)
7-
- Implement complete bytecode emitter and stack-based VM
8-
- Add microbenchmarks and perf harness
9-
10-
Phase B - Memory Model & Concurrency
11-
- Implement generational garbage collector with write barriers
12-
- Add coroutines, async/await, threads, channels, actor model
13-
- Provide scheduler (cooperative + preemptive)
14-
15-
Phase C - Optional Static Type System
16-
- Optional type annotations and type inference
17-
- Generics and specialization
18-
- Type-based optimizations and VM fast paths
19-
20-
Phase D - Standard Library
21-
- Filesystem, networking, crypto, JSON, regex, datetime, subprocess
22-
- Database connectors via FFI
23-
24-
Phase E - Tooling & Ecosystem
25-
- Package manager (prx), registry service
26-
- LSP server, Debugger (DAP), VSCode extension
27-
- REPL improvements
28-
29-
Phase F - JIT Backend
30-
- Tracing JIT / LLVM-based backend
31-
- Hot-path detection and codegen
32-
- JIT > 2x baseline performance target
33-
34-
Testing and CI
35-
- Unit coverage target 95%
36-
- Fuzzing for parser/VM
37-
- Cross-platform CI matrix (Linux/macOS/Windows)
38-
39-
Security & Migration
40-
- FFI sandboxing and capability-based modules
41-
- Migration guides & codemods
3+
This document outlines the development phases for ProXPL, tracking our journey from a C-based interpreter to a professional compiler ecosystem.
4+
5+
## ✅ Phase A - Core Runtime (Completed)
6+
**Status: Production Ready**
7+
- [x] Stack-based Virtual Machine (VM)
8+
- [x] Bytecode Compiler & Opcodes
9+
- [x] Native C Implementation
10+
- [x] Basic REPL
11+
12+
## ✅ Phase B - Memory & Type System (Completed)
13+
**Status: Stable**
14+
- [x] Mark-and-Sweep Garbage Collector
15+
- [x] Static Type System (Int, Float, Bool, String)
16+
- [x] Complex Types (List, Dict, Function)
17+
- [x] Scope-based Memory Management
18+
19+
## ✅ Phase C - Standard Library (Completed)
20+
**Status: Rich Feature Set**
21+
- [x] Core I/O (`print`, `input`)
22+
- [x] Math Library (`std.math`)
23+
- [x] String Utilities (`std.string`)
24+
- [x] File System (`std.fs`)
25+
- [x] System Interface (`std.sys`)
26+
27+
## 🚧 Phase D - Ecosystem & Tooling (Current Focus)
28+
**Status: In Progress (v0.4.0)**
29+
- [x] VS Code Extension (Syntax Highlighting, Snippets)
30+
- [x] Package Manager (PRM) foundation
31+
- [x] Module System (`use` keyword)
32+
- [ ] Language Server Protocol (LSP) - **Next**
33+
- [ ] Debugger Adapter Protocol (DAP)
34+
35+
## 🔮 Phase E - Future Modernization (2025 Roadmap)
36+
37+
### Q1 2025: Developer Experience
38+
- Enhanced Error Reporting (Column tracking, suggestions)
39+
- PRM Registry integration (Remote packages)
40+
- VS Code Extension 1.0 (IntelliSense, Hover)
41+
42+
### Q2 2025: Object-Oriented Features
43+
- Classes & Interfaces
44+
- Inheritance & Polymorphism
45+
- Access Modifiers (`public`, `private`)
46+
47+
### Q3 2025: Advanced Language Features
48+
- Coroutines / Async-Await
49+
- Pattern Matching
50+
- Generics
51+
- Algebraic Data Types (Enums)
52+
53+
### Q4 2025: Performance & Native
54+
- LLVM AOT Compilation (Stable)
55+
- JIT Compilation Research
56+
- Foreign Function Interface (FFI)
57+
58+
## Release History
59+
60+
- **v0.4.0** - VS Code Extension, Version Bump
61+
- **v0.3.0** - Module System, updated `use` syntax
62+
- **v0.2.0** - Initial Public Release, basic VM

docs/stdlib/STDLIB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Complete Documentation for Built-in Functions**
44

5-
**Version:** 1.0.0
5+
**Version:** 0.4.0
66
**Last Updated:** December 2024
77
**Status:** Stable
88

extension/README.md

Lines changed: 82 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,90 @@
11
# ProXPL VS Code Extension
22

3-
Official language support for ProXPL.
3+
Professional language support for **ProXPL** (ProX Programming Language) in Visual Studio Code. This extension provides a rich development experience with syntax highlighting, code snippets, and language configuration.
44

5-
## Features
5+
## Features
66

7-
- **Syntax Highlighting**: Supports keywords, types, operators, and comments.
8-
- **Snippets**: Quick boilerplate for `main` function and control flow.
9-
- **Language Configuration**: Smart brackets, auto-closing pairs, and indentation.
7+
### 🎨 Syntax Highlighting
8+
Comprehensive syntax highlighting for all ProXPL language features:
9+
- **Keywords**: Control flow (`if`, `while`, `for`), declarations (`func`, `let`, `const`), and modules (`use`).
10+
- **Types**: Built-in types (`int`, `float`, `string`, `bool`, `list`, `dict`).
11+
- **Literals**: Numbers (hex, binary, float), strings (escapes), and booleans.
12+
- **Comments**: Single-line (`//`) and multi-line (`/* ... */`).
1013

11-
## Installation
14+
### 🧩 Code Snippets
15+
Boost your productivity with built-in snippets for common patterns:
16+
- `main` - scaffolding for the main entry point
17+
- `func` - function declaration structure
18+
- `if`, `ifelse` - conditional logic
19+
- `for`, `while` - loop structures
20+
- `print` - quick print statement
21+
- `try` - error handling block
22+
- `use` - module import
23+
- `doc` - Documentation comments
1224

13-
To test locally:
14-
1. Open this `extension/` folder in VS Code.
15-
2. Press `F5` to open the Extension Development Host.
16-
3. Open or create a `.prox` file to see the extension in action.
25+
### 🛠️ Language Configuration
26+
- **Auto-closing pairs**: Automatically closes braces `{}`, brackets `[]`, parentheses `()`, and quotes.
27+
- **Bracket matching**: Visual indicators for matching brackets.
28+
- **Comment toggling**: Use `Ctrl+/` (or `Cmd+/`) to toggle comments.
29+
- **Folding**: Collapse and expand code blocks.
1730

18-
## Development
31+
## 📦 Installation
1932

20-
- Grammar resides in `syntaxes/proxpl.tmLanguage.json`.
21-
- Snippets are defined in `snippets/proxpl-snippets.json`.
22-
- General settings are in `language-configuration.json`.
33+
### From Marketplace
34+
(Coming Soon to VS Code Marketplace)
35+
36+
### Manual Installation (.vsix)
37+
1. Download the latest `.vsix` release from the [ProXPL Releases](https://github.com/ProgrammerKR/ProXPL/releases).
38+
2. Open VS Code.
39+
3. Go to the Extensions view (`Ctrl+Shift+X`).
40+
4. Click the `...` menu and select **"Install from VSIX..."**.
41+
5. Select the downloaded file.
42+
43+
### For Developers (Source)
44+
1. Clone the repository:
45+
```bash
46+
git clone https://github.com/ProgrammerKR/ProXPL.git
47+
cd ProXPL/extension
48+
```
49+
2. Install dependencies:
50+
```bash
51+
npm install
52+
```
53+
3. Open in VS Code:
54+
```bash
55+
code .
56+
```
57+
4. Press `F5` to launch the Extension Development Host.
58+
59+
## 🚀 Usage
60+
61+
Create a file with `.prox` or `.pxpl` extension to activate the extension.
62+
63+
```javascript
64+
// hello.prox
65+
func main() {
66+
print("Hello, ProXPL!");
67+
}
68+
```
69+
70+
## ⌨️ Shortcuts
71+
72+
| Snippet Prefix | Description |
73+
|----------------|-------------|
74+
| `main` | Create main function |
75+
| `func` | Define a new function |
76+
| `print` | Print statement |
77+
| `use` | Import a module |
78+
| `let` | Variable declaration |
79+
80+
## 🤝 Contributing
81+
82+
Found a bug or want to improve the syntax highlighting? Contributions are welcome!
83+
84+
1. Fork the repo.
85+
2. Create a feature branch.
86+
3. Submit a Pull Request.
87+
88+
## 📄 License
89+
90+
This extension is part of the ProXPL project and is licensed under the [MIT License](../LICENSE).

0 commit comments

Comments
 (0)