Skip to content

Commit

Permalink
Add syntax highlighting support for 'typeis' operator
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementNerma committed Dec 9, 2024
1 parent 497a88d commit f37ac48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions crates/repl/src/highlighter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ static RULE_SET: LazyLock<Arc<ValidatedRuleSet>> = LazyLock::new(|| {
// Symbols and operators
simple("(,|\\s[&\\|;=!<>\\?\\+\\-\\*\\/:\\(\\)\\{\\}\\[\\]\\!]\\s|&&|\\|\\|)", [LightYellow]),

// 'typeis' operator
simple("\\b(typeis)\\b", [Magenta]),

// Other characters
simple("(.)", [Green])
])
Expand Down
2 changes: 1 addition & 1 deletion vscode-syntax/syntaxes/reshell.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"name": "constant"
},
{
"match": "\\b(let|mut|if|else|for|in|while|typematch|match|case|continue|break|fn|return|throw|alias|type|try|catch|self|include)\\b",
"match": "\\b(let|mut|if|else|for|in|while|typematch|match|case|continue|break|fn|return|throw|alias|type|try|catch|self|include|typeis)\\b",
"name": "keyword"
},
{
Expand Down

0 comments on commit f37ac48

Please sign in to comment.