Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,80 @@ jobs:
with:
submodules: true

- name: Verify submodules (Unix)
if: runner.os != 'Windows'
shell: bash
run: |
echo "Checking submodules..."
if [ -d "pain-compiler" ]; then
echo "pain-compiler exists"
ls -la pain-compiler/resources/icons/linux/ || echo "ERROR: pain-compiler icons directory not found"
else
echo "ERROR: pain-compiler submodule not found"
exit 1
fi
if [ -d "pain-lsp" ]; then
echo "pain-lsp exists"
ls -la pain-lsp/resources/icons/linux/ || echo "ERROR: pain-lsp icons directory not found"
else
echo "ERROR: pain-lsp submodule not found"
exit 1
fi

- name: Verify submodules (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Write-Host "Checking submodules..."
if (Test-Path "pain-compiler") {
Write-Host "pain-compiler exists"
if (Test-Path "pain-compiler/resources/icons/linux") {
Get-ChildItem "pain-compiler/resources/icons/linux" | Format-Table
} else {
Write-Host "ERROR: pain-compiler icons directory not found"
}
} else {
Write-Host "ERROR: pain-compiler submodule not found"
exit 1
}
if (Test-Path "pain-lsp") {
Write-Host "pain-lsp exists"
if (Test-Path "pain-lsp/resources/icons/linux") {
Get-ChildItem "pain-lsp/resources/icons/linux" | Format-Table
} else {
Write-Host "ERROR: pain-lsp icons directory not found"
}
} else {
Write-Host "ERROR: pain-lsp submodule not found"
exit 1
}

- name: Update version from tag
if: github.ref_type == 'tag'
shell: bash
run: |
# Extract version from tag (github.ref_name already contains tag name without refs/tags/)
# Remove 'v' prefix if present
TAG_NAME="${{ github.ref_name }}"
if [[ "$TAG_NAME" == v* ]]; then
VERSION="${TAG_NAME#v}"
else
VERSION="$TAG_NAME"
fi
echo "Updating version to: $VERSION"

# Update version in workspace Cargo.toml
if [[ "$RUNNER_OS" == "Windows" ]]; then
# Windows - use PowerShell for file operations
powershell -Command "(Get-Content Cargo.toml) -replace 'version = \".*\"', 'version = \"$VERSION\"' | Set-Content Cargo.toml"
powershell -Command "Select-String -Path Cargo.toml -Pattern '^version = '"
else
# Unix (Linux/macOS) - use sed
sed -i.bak "s/^version = \".*\"/version = \"$VERSION\"/" Cargo.toml
rm -f Cargo.toml.bak
grep "^version = " Cargo.toml
fi

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ hello.pain
utils/__pycache__/
utils/*.pyc

# Development tasks tracking (local only)
TASKS.MD
TASKS.md
tasks.md

46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,52 @@ All notable changes to the Pain programming language will be documented in this
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2025-01-XX

### Added

#### PML (Pain Markup Language) v0.1
- **PML Parser** - Complete lexer and parser implementation for PML format
- Tab-based indentation parsing (1 TAB = 1 level)
- Support for SCALAR, MAP, and LIST node types
- Comment parsing with `#` syntax
- String, int, float, bool, and null value types
- Escape sequence support (`\n`, `\t`, `\r`, `\\`, `\"`, `\'`)
- Comprehensive error handling with detailed error messages
- **PML Standard Library** - Runtime functions for PML integration
- `pml_load_file(path: str) -> dynamic` - Load and parse PML files
- `pml_parse(source: str) -> dynamic` - Parse PML strings
- **PML Documentation** - Complete specification and examples
- PML v0.1 specification document (`docs/PML_SPEC.md`)
- PML examples and usage guide (`docs/examples_pml.md`)
- 40+ unit tests covering edge cases (Unicode, long strings, deep nesting, etc.)
- 5 integration tests for stdlib functions
- Performance benchmarks (10 benchmarks documented)

#### VS Code Extension Enhancements
- **PML Language Support** - Full syntax highlighting for `.pml` files
- TextMate grammar for PML syntax
- Language configuration for PML
- PML file association and recognition
- **Custom File Icons** - Visual file type identification
- Custom PNG icons for `.pain` files
- Custom PNG icons for `.pml` files
- Icon theme configuration for VS Code/Cursor
- **Extension Distribution** - Ready for VSIX distribution via repository

### Changed
- Improved error handling in PML parser with Display trait for `PmlParseError`
- Enhanced code quality (clippy, fmt) - all checks passing
- Performance profiling and analysis document created (`.pain_dev_docs/PML_PERFORMANCE.md`)

### Testing
- Expanded PML parser test coverage (40 unit tests)
- Added PML integration tests (5 tests for stdlib functions)
- Edge case testing (15+ edge cases: Unicode, long strings, deep nesting, etc.)
- Performance benchmarking suite (10 benchmarks)

[0.2.0]: https://github.com/pain-lng/pain/releases/tag/v0.2.0

## [0.1.0] - 2025-11-20

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ members = [
resolver = "2"

[workspace.package]
version = "0.1.0"
version = "0.2.0"
edition = "2021"
authors = ["Pain Team"]
license = "MIT OR Apache-2.0"
Expand Down
110 changes: 110 additions & 0 deletions RELEASE_NOTES_v0.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Pain v0.2.0 Release Notes

**Release Date:** January 2025
**Release Type:** Feature Release (Alpha)

## Overview

Pain v0.2.0 introduces **PML (Pain Markup Language)** v0.1, a minimalistic declarative data format designed for UI structures, configurations, and tree data. This release also includes significant enhancements to the VS Code/Cursor extension with PML support and custom file icons.

## 🎉 Major Features

### PML (Pain Markup Language) v0.1

PML is a YAML-inspired but simplified markup language with strict rules for predictability, ease of parsing, and high performance.

**Key Features:**
- **Tab-based indentation** - Strict 1 TAB = 1 level rule
- **Three node types**: SCALAR, MAP, LIST
- **Type support**: strings, integers, floats, booleans, null
- **Comment support** with `#` syntax
- **Escape sequences** for strings (`\n`, `\t`, `\r`, `\\`, `\"`, `\'`)
- **Simple syntax**: `key: value` for maps, `- item` for lists

**Standard Library Functions:**
- `pml_load_file(path: str) -> dynamic` - Load and parse PML files
- `pml_parse(source: str) -> dynamic` - Parse PML strings

**Example Usage:**
```pain
fn main():
let config = pml_load_file("config.pml")
let app_name = config.app.name
print("Starting " + app_name)
```

**Documentation:**
- Complete specification: [`docs/PML_SPEC.md`](docs/PML_SPEC.md)
- Examples and usage: [`docs/examples_pml.md`](docs/examples_pml.md)

### VS Code/Cursor Extension Enhancements

**PML Language Support:**
- Full syntax highlighting for `.pml` files
- TextMate grammar for PML syntax
- Language configuration and file associations

**Custom File Icons:**
- Custom PNG icons for `.pain` files
- Custom PNG icons for `.pml` files
- Icon theme configuration for better visual identification

**Distribution:**
- Extension ready for VSIX distribution via repository
- Version 0.2.0 with PML support

## 📊 Testing & Quality

- **40+ unit tests** for PML parser covering edge cases
- **5 integration tests** for PML stdlib functions
- **15+ edge cases** tested: Unicode, long strings, deep nesting, etc.
- **10 performance benchmarks** documented
- All code quality checks passing (clippy, fmt)

## 📚 Documentation

- PML v0.1 specification document
- PML examples and usage guide
- Performance analysis document (`.pain_dev_docs/PML_PERFORMANCE.md`)

## 🔧 Technical Details

**PML Parser Implementation:**
- ~250-350 lines of parser code
- Comprehensive error handling with detailed messages
- High-performance parsing with minimal allocations
- Support for deeply nested structures (tested up to 10+ levels)

**Performance:**
- Fast parsing of simple maps: < 1μs
- Efficient handling of large structures (100+ keys/items)
- Optimized for common use cases (UI configs, app settings)

## 🚀 Migration Guide

No breaking changes from v0.1.0. This is a purely additive release.

**To use PML:**
1. Create `.pml` files with your data structures
2. Use `pml_load_file()` or `pml_parse()` in your Pain code
3. Access parsed data as dynamic objects

**VS Code Extension:**
- Update to v0.2.0 to get PML syntax highlighting
- Custom icons will appear automatically for `.pain` and `.pml` files

## 📦 What's Next

**Planned for v0.3.0:**
- PML v0.2: inline strings, extended escape sequences, nullable values
- Tensor support for ML workloads
- Python bridge for data science workflows

## 🙏 Acknowledgments

Thanks to all contributors and testers who helped make this release possible!

---

**Full Changelog:** See [CHANGELOG.md](CHANGELOG.md) for complete list of changes.

Loading
Loading