Parser: - Fix parseGenericConstraint to recognize '=' as a stop token, enabling fn foo(x: int64 = 0) syntax - Fix parseModulePath and parseImportPath to handle '../' as a single token (the lexer greedily merges '..' and '/') Typechecker: - Relax isCapable to accept fewer arguments when trailing parameters have defaults - Fill in default values for missing arguments in lowerResolvedCall C runtime: - Add peon_wait_queue_pop_back and peon_wait_queue_wake_last for O(1) tail removal, making WaitQueue a proper deque - Rename wake_one -> wake_first for symmetry with wake_last Stdlib: - Move sync.pn into sync/ directory (events.pn, queues.pn) - Fix Event.set() missing self.signaled = true assignment (deadlock bug) - Add wakeLast and isEmpty bindings for WaitQueue - Fix WaitQueue clone to use UFCS init() style Syntax highlighting: - Fix import path regex to support multiple ../ prefixes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Peon Syntax Highlighting
VS Code syntax highlighting for the Peon programming language.
This extension provides TextMate-based highlighting for Peon source files with the
.pn and .peon extensions.
Features
- Highlights Peon declarations such as
fn,operator,type,iface,object,tuple,enum,var,let, andconst, includingasync fnandasync generator fn. - Recognizes Peon-specific syntax including
#pragma[...],match/case,when, structured-concurrency keywords such asawait,nursery,spawn, andshield, type-form keywords such asref,lent,mut, andptr, structural tuple literals like(x: 1, y: 2), and UFCS-style member access. - Supports Peon literals and operators including:
- numeric suffixes like
1'i64and255'u8 - binary, octal, hexadecimal, integer, and float literals
- raw, byte, format, and triple-quoted strings
- backticked identifiers and operator names such as
`+`and`destroy=`
- numeric suffixes like
- Configures editor behavior for Peon comments, brackets, quotes, and backticks.
Language Support
The extension currently contributes:
- Language id:
peon - File extensions:
.pn,.peon - TextMate scope:
source.peon
Development
To run the extension in a development host:
- Open this folder in VS Code.
- Press
F5. - In the Extension Development Host window, open a
.pnfile.
To build a VSIX package locally:
npx @vscode/vsce package
Known Limitations
- This is a syntax-highlighting extension only. It does not currently provide formatting, diagnostics, semantic tokens, or language server features.
- Highlighting is based on the current Peon manual and compiler implementation. If the language evolves, the grammar should be updated alongside compiler changes.
Release Notes
0.0.1
Initial syntax-highlighting release for Peon.