aboutsummaryrefslogtreecommitdiff
path: root/code/src/syntax_highlight/grammar.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-08-30 20:04:29 +0200
committermetamuffin <metamuffin@disroot.org>2022-08-30 20:04:29 +0200
commit1216c64ac850379aa2000d47b110d50c8a883636 (patch)
treeb04494a3dd1d6f8c5f4feaa567ee353d0b80a028 /code/src/syntax_highlight/grammar.rs
parent30e75b521da3230d99f3ccb4b68471f9b5e3035e (diff)
downloadmetamuffin-blog-1216c64ac850379aa2000d47b110d50c8a883636.tar
metamuffin-blog-1216c64ac850379aa2000d47b110d50c8a883636.tar.bz2
metamuffin-blog-1216c64ac850379aa2000d47b110d50c8a883636.tar.zst
small improvements
Diffstat (limited to 'code/src/syntax_highlight/grammar.rs')
-rw-r--r--code/src/syntax_highlight/grammar.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/code/src/syntax_highlight/grammar.rs b/code/src/syntax_highlight/grammar.rs
index dad2eec..aa4008a 100644
--- a/code/src/syntax_highlight/grammar.rs
+++ b/code/src/syntax_highlight/grammar.rs
@@ -4,14 +4,14 @@ pub fn grammar_for(syntax: &str) -> &'static [(&'static str, &'static [&'static
(
"keyword",
&[
- "fn", "pub", "async", "return", "if", "else", "let", "for", "while", "loop",
- "impl", "for", "trait", "struct", "enum",
+ "fn", "pub", "async", "return", "if", "else", "let", "for", "in", "while",
+ "loop", "impl", "for", "trait", "struct", "enum",
],
),
(
"type",
&[
- "[A-Z][a-z]*",
+ "[A-Z][a-z0-9]*",
"bool",
"usize",
"u8",