Repository navigation
Add Lateralus lexer - #1249
Merged
Merged
Add Lateralus lexer#1249
Conversation
Adds a chroma 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: lateralus, ltl - Homepage: https://lateralus.dev Includes testdata/lateralus.actual and .expected generated via RECORD=true. Produces zero Error tokens on the sample.
alecthomas
approved these changes
Apr 25, 2026
alecthomas
approved these changes
Apr 25, 2026
Owner
|
Thanks! |
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
.ltllateralus,ltlWhat's included
lexers/embedded/lateralus.xml— XML lexer config covering 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.14f32,0xFF_i32), module paths (foo::bar), ADT variants, and the signature pipeline operator|>.lexers/testdata/lateralus.actual— real example from the Lateralus reference implementation'sexamples/directory (MIT licensed).lexers/testdata/lateralus.expected— golden output generated viaRECORD=true go test.Tests
go test ./lexers/ -run TestLexers/Lateralus→ PASSgo test ./lexers/ -run 'TestCompileAllRegexes|TestGlobs|TestAliases'→ PASSErrortokens.Sample license
The
fibonacci.ltlsample is copied verbatim from the Lateralus reference implementation under MIT; happy to relicense for inclusion if preferred.