Add Lateralus lexer#2281
Open
bad-antics wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
.ltlltltext/x-lateralusFiles
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 skipsbundle exec rake check:warnings→ same resultSample 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.