Files
tree-sitter-lscript/test/fixtures/valid/pipelines.ls
T
paulandClaude Sonnet 5.5 61ea7166e3 Support some, ok and err wrappers and untyped function inputs
Track the LScript changes since the grammar was first written:

- some, ok and err are reserved prefix operators and wrapper patterns;
  the old |.some/|.ok/|.err forms and postfix/prefix ! are rejected
- function literal inputs may omit their type annotation, and tuple
  components may omit theirs; an empty typed tuple pattern is now just
  the unit pattern
- migrate fixtures, corpus, queries, CST contract and Rust tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 14:54:48 -04:00

24 lines
410 B
Plaintext

Error :: distinct |{
failed
}
reversed := 'value'->reverse_chrs
sum_text := {1 + 2}->to_str
continued := 'value'
->reverse_chrs
->reverse_chrs
commented := 'value' # an inline comment preserves continuation
->reverse_chrs
computed := 1 + 2
->to_str
fallible: i32 -> i32 ! Error: @ value: i32 { ok value }
propagate: i32 -> i32 ! Error: @ value: i32 {
result := {value->fallible}?
ok result
}