Skip to content

Conversation

noahgift
Copy link

Summary

Adds syntax highlighting support for the Ruchy programming language.

Language Overview

Ruchy is a modern systems programming language featuring:

  • Actor model concurrency with message passing
  • Pipeline operators for functional data transformation
  • Rust-like syntax with memory safety
  • Pattern matching and functional constructs

Implementation Details

  • Complete language definition (src/languages/ruchy.js)
  • Detection tests (test/detect/ruchy/default.txt)
  • Markup tests (test/markup/ruchy/default.txt)

File Extensions

  • .rhy (primary)
  • .ruchy (alternative)

Language Aliases

  • ruchy
  • Ruchy

Key Syntax Features

// Actor definitions
actor Counter {
    let mut count: i32 = 0;
    
    receive Increment(n) -> {
        count += n;
    }
    
    receive GetCount -> count
}

// Actor instantiation and messaging
let counter = spawn!(Counter);
counter <- Increment(5);          // Send message
let result = counter <? GetCount; // Ask pattern

// Pipeline operations
data >> validate >> transform >> persist

// Pattern matching
match value {
    Some(x) if x > 0 -> println!("Positive: {}", x),
    Some(x) -> println!("Non-positive: {}", x),
    None -> println!("No value"),
}

Syntax Highlighting Coverage

  • ✅ Keywords (fn, let, mut, actor, spawn, receive, match, etc.)
  • ✅ Types (i32, String, bool, etc.)
  • ✅ Operators (>>, <-, <?, =>, etc.)
  • ✅ Literals (strings, numbers, booleans)
  • ✅ Comments (line and block)
  • ✅ Macros and built-ins (println!, spawn!, etc.)
  • ✅ Attributes and decorators

Testing

All detection and markup tests pass, correctly identifying Ruchy code and applying appropriate syntax highlighting.

🤖 Generated with Claude Code

Adds syntax highlighting for the Ruchy programming language - a modern systems language featuring actor model concurrency, pipeline operators, and Rust-like syntax with functional features.

Features:
- Actor definitions and message passing
- Pipeline operators (>>) for data flow
- Actor messaging operators (<-, <?)
- Rust-like keywords and syntax
- Pattern matching and functional constructs
- Memory safety primitives

Files added:
- src/languages/ruchy.js - Language definition with comprehensive syntax patterns
- test/detect/ruchy/default.txt - Language detection test
- test/markup/ruchy/default.txt - Markup rendering test

File extensions: .rhy, .ruchy
Aliases: ruchy, Ruchy

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants