rouge
rouge copied to clipboard
Add Ruchy language support
Summary
Adds comprehensive syntax highlighting support for the Ruchy programming language.
Language Features
- Actor model concurrency -
actorkeyword and messaging operators - Pipeline operators -
>>for data transformation pipelines - Rust-like syntax - Modern systems language with memory safety
- Functional features - Pattern matching, immutable by default
Implementation Details
- Complete lexer (
lib/rouge/lexers/ruchy.rb) - Full token recognition for all Ruchy constructs - Comprehensive tests (
spec/lexers/ruchy_spec.rb) - Unit tests covering syntax patterns - Visual sample (
spec/visual/samples/ruchy_demo.rhy) - Demonstration of language features
File Extensions
.rhy(primary).ruchy(alternative)
Key Syntax Patterns
// Actor definitions
actor Counter {
let mut count: i32 = 0;
receive Increment(n) -> {
count += n;
}
}
// Pipeline operations
data
>> validate
>> transform
>> persist
// Actor messaging
counter <- Increment(5)
result <- counter <? GetCount
Testing
All tests pass and the lexer correctly identifies Ruchy files by content and extension.
🤖 Generated with Claude Code