Skip to content

Commit

Permalink
Add print and format examples
Browse files Browse the repository at this point in the history
  • Loading branch information
oovm committed Jan 27, 2025
1 parent 06da605 commit 0b2c6c0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
25 changes: 25 additions & 0 deletions packages/valkyrie-esoteric/source/statement/let-statement.valkyrie
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
let mut, `let`;
let mut a, ref b;
let mut a, ref b: i32, &i32;
⍝ test keywords
let `let` `let`: `let` = 1
let mut mut: mut = 1
⍝ test tuple
let mut `let`, mut = (1, 2);
let mut (`let`, mut) = (1, 2)
let (mut `let`, mut) = (1, 2)
⍝ test slice
let mut `let`, ..mut = [1, 2];
let mut [`let`, ...mut] = [1, 2]
let [mut `let`, ...mut] = [1, 2]
⍝ test dict
let mut {`let`, ..mut} = 0;
let mut {`let`: mut, ..mut} = 0;
let {mut `let`: `let`, mut ..mut} = 0;
⍝ test case match
let case (mut a, b) = (1, 2)
let case mut (a, b) = (1, 2)
let case Fraction(mut a, b) = Fraction(1, 2)
let case mut Fraction(a, b) = Fraction(1, 2)


⍝ let pattern
let x = expression();
let x, y = expression();
Expand Down
24 changes: 0 additions & 24 deletions packages/valkyrie-esoteric/source/statement/let-statement.vk

This file was deleted.

0 comments on commit 0b2c6c0

Please sign in to comment.