Skip to content

Add Lateralus lexer#2281

Open
bad-antics wants to merge 1 commit into
rouge-ruby:mainfrom
bad-antics:add-lateralus
Open

Add Lateralus lexer#2281
bad-antics wants to merge 1 commit into
rouge-ruby:mainfrom
bad-antics:add-lateralus

Conversation

@bad-antics
Copy link
Copy Markdown

Adds a lexer for Lateralus, a statically typed, pipeline-oriented programming language with algebraic data types, pattern matching, and first-class effect capabilities.

Language info

Files

  • lib/rouge/lexers/lateralus.rb — the lexer. Covers keywords, builtin types and functions, attribute decorators (@memo), capability annotations (#[caps(io, net)]), nested block comments, raw/byte/interpolated strings, numeric literals with type suffixes (42u64, 3.14_f32, 0xFF_i32), module paths (foo::bar), ADT variants (upper-camel-case identifiers), and the signature pipeline operator |>.
  • lib/rouge/demos/lateralus — demo used by the rouge demo page.
  • spec/visual/samples/lateralus — visual sample.
  • spec/lexers/lateralus_spec.rb — RSpec/minitest spec covering filename & mimetype guessing, the pipeline operator, typed integer/float/hex/bin literals, keywords, builtin types, decorators, and comment styles. 12 runs / 40 assertions / 0 failures.

Tests

  • bundle exec rake check:specs → 1308 runs, 5676 assertions, 0 failures, 0 errors, 0 skips
  • bundle exec rake check:warnings → same result

Sample license

The demo file is a short original Lateralus program written for this PR, happy for it to be included under rouge's MIT license.

Adds a lexer for the Lateralus programming language, a statically typed,
pipeline-oriented language with algebraic data types, pattern matching,
and first-class effect capabilities.

- File extension: .ltl
- Aliases: ltl
- Homepage: https://lateralus.dev

Includes demo file, visual sample, and an RSpec spec covering filename
and mimetype guessing, the pipeline operator, typed integer/float
literals, keywords, builtin types, decorators, and comment styles.
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.

1 participant