summaryrefslogtreecommitdiff
path: root/src/syntax/highlight.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-03-11 12:22:27 +0100
committerLaurenz <laurmaedje@gmail.com>2022-03-11 12:22:27 +0100
commit5ce2a006b6d45d29be15e4562ae3ab4fc1b8e97c (patch)
tree454b25e04530adcdf08a161e1ab09abb33c0644c /src/syntax/highlight.rs
parente6b532391deb1e30dc356c4d20dd48199f748f29 (diff)
Consistent block naming
Diffstat (limited to 'src/syntax/highlight.rs')
-rw-r--r--src/syntax/highlight.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/syntax/highlight.rs b/src/syntax/highlight.rs
index 82f1ea0e..20ea4039 100644
--- a/src/syntax/highlight.rs
+++ b/src/syntax/highlight.rs
@@ -104,10 +104,10 @@ impl Category {
/// Determine the highlighting category of a node given its parent.
pub fn determine(child: RedRef, parent: RedRef) -> Option<Category> {
match child.kind() {
- NodeKind::LeftBracket => Some(Category::Bracket),
- NodeKind::RightBracket => Some(Category::Bracket),
NodeKind::LeftBrace => Some(Category::Bracket),
NodeKind::RightBrace => Some(Category::Bracket),
+ NodeKind::LeftBracket => Some(Category::Bracket),
+ NodeKind::RightBracket => Some(Category::Bracket),
NodeKind::LeftParen => Some(Category::Bracket),
NodeKind::RightParen => Some(Category::Bracket),
NodeKind::Comma => Some(Category::Punctuation),
@@ -176,13 +176,13 @@ impl Category {
NodeKind::Auto => Some(Category::Auto),
NodeKind::Ident(_) => match parent.kind() {
NodeKind::Named => None,
- NodeKind::Closure if child.span().start == parent.span().start => {
+ NodeKind::ClosureExpr if child.span().start == parent.span().start => {
Some(Category::Function)
}
NodeKind::WithExpr => Some(Category::Function),
NodeKind::SetExpr => Some(Category::Function),
NodeKind::ShowExpr => Some(Category::Function),
- NodeKind::Call => Some(Category::Function),
+ NodeKind::CallExpr => Some(Category::Function),
_ => Some(Category::Variable),
},
NodeKind::Bool(_) => Some(Category::Bool),
@@ -202,18 +202,18 @@ impl Category {
NodeKind::TextInLine(_) => None,
NodeKind::List => None,
NodeKind::Enum => None,
- NodeKind::Array => None,
- NodeKind::Dict => None,
+ NodeKind::CodeBlock => None,
+ NodeKind::TemplateBlock => None,
+ NodeKind::GroupExpr => None,
+ NodeKind::ArrayExpr => None,
+ NodeKind::DictExpr => None,
NodeKind::Named => None,
- NodeKind::Template => None,
- NodeKind::Group => None,
- NodeKind::Block => None,
- NodeKind::Unary => None,
- NodeKind::Binary => None,
- NodeKind::Call => None,
+ NodeKind::UnaryExpr => None,
+ NodeKind::BinaryExpr => None,
+ NodeKind::CallExpr => None,
NodeKind::CallArgs => None,
NodeKind::Spread => None,
- NodeKind::Closure => None,
+ NodeKind::ClosureExpr => None,
NodeKind::ClosureParams => None,
NodeKind::WithExpr => None,
NodeKind::LetExpr => None,