From 1216c64ac850379aa2000d47b110d50c8a883636 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 30 Aug 2022 20:04:29 +0200 Subject: small improvements --- code/src/syntax_highlight/grammar.rs | 6 +++--- code/src/syntax_highlight/theme.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'code') 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", diff --git a/code/src/syntax_highlight/theme.rs b/code/src/syntax_highlight/theme.rs index 77018db..288662a 100644 --- a/code/src/syntax_highlight/theme.rs +++ b/code/src/syntax_highlight/theme.rs @@ -3,7 +3,7 @@ pub fn theme(kind: &str) -> &'static str { "keyword" => "#9999ff", "macro" => "#ff2863", "literal" => "#26a6ff", - "functions" => "#26ffbc", + "function" => "#26ffbc", "types" => "#26ff34", "identifier" => "#ccff26", "" => "#ff7c26", -- cgit v1.2.3-70-g09d2