Skip to content

Commit

Permalink
add some more docs searc aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Sep 20, 2024
1 parent c9cc5d4 commit 98c100d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
24 changes: 16 additions & 8 deletions site/src/docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,24 @@ struct Allowed {
}

fn aliases() -> HashMap<&'static str, &'static [Primitive]> {
use Primitive::*;
[
("filter", &[Primitive::Keep] as &[_]),
("search", &[Primitive::Find]),
("intersect", &[Primitive::Member]),
("split", &[Primitive::Partition]),
("while", &[Primitive::Do]),
("for", &[Primitive::Repeat]),
("invert", &[Primitive::Un]),
("filter", &[Keep] as &[_]),
("search", &[Find, Mask]),
("intersect", &[MemberOf]),
("split", &[Partition]),
("while", &[Do]),
("for", &[Repeat]),
("invert", &[Un]),
("encode", &[Bits, Base]),
("decode", &[Bits, Base]),
("prefixes", &[Tuples]),
("suffixes", &[Tuples]),
("flatten", &[Deshape]),
]
.into()
.into_iter()
.flat_map(|(alias, prims)| (3..=alias.len()).map(move |len| (&alias[..len], prims)))
.collect()
}

thread_local! {
Expand Down
1 change: 0 additions & 1 deletion todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- Rename and stabilize `but` and `with`
- Likely `with` and `off`
- Make ASCII glyph typing more consistent
- `base` subscript
- `bits` subscript?
- Update language tour
- Update design page
Expand Down

0 comments on commit 98c100d

Please sign in to comment.