diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-23 16:01:15 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-27 11:38:04 +0100 |
| commit | 33585d9a3fbab8a76d3fd8e9c2560f929202a518 (patch) | |
| tree | 30ca6e09c91539013dd9acc5684edc330d0c29ce /src | |
| parent | 4653ffebb43d733a3cff873d0903c7d00aaeb499 (diff) | |
Small fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/ide/highlight.rs | 7 | ||||
| -rw-r--r-- | src/syntax/lexer.rs | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ide/highlight.rs b/src/ide/highlight.rs index 5f615d04..75201d93 100644 --- a/src/ide/highlight.rs +++ b/src/ide/highlight.rs @@ -192,6 +192,13 @@ pub fn highlight(node: &LinkedNode) -> Option<Category> { ) => Some(Category::Interpolated), Some(SyntaxKind::FuncCall) => Some(Category::Function), Some(SyntaxKind::FieldAccess) + if node.parent().and_then(|p| p.parent_kind()) + == Some(SyntaxKind::SetRule) + && node.next_sibling().is_none() => + { + Some(Category::Function) + } + Some(SyntaxKind::FieldAccess) if node .parent() .and_then(|p| p.parent()) diff --git a/src/syntax/lexer.rs b/src/syntax/lexer.rs index 433d0def..1064939d 100644 --- a/src/syntax/lexer.rs +++ b/src/syntax/lexer.rs @@ -429,6 +429,7 @@ impl Lexer<'_> { '-' if self.s.eat_if('>') => SyntaxKind::Shorthand, '=' if self.s.eat_if('>') => SyntaxKind::Shorthand, ':' if self.s.eat_if('=') => SyntaxKind::Shorthand, + '.' if self.s.eat_if("..") => SyntaxKind::Shorthand, '_' => SyntaxKind::Underscore, '$' => SyntaxKind::Dollar, |
