diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-14 09:57:52 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-14 09:57:52 +0100 |
| commit | 2470df05af993e89405c5c86329e08243960641d (patch) | |
| tree | 0f241650ab94b52eb11c3f43bbec2711234f65ad /src/syntax/kind.rs | |
| parent | ad66fbdfa2d39e39c2a7d7411e27cb61ada2b648 (diff) | |
Linked syntax node
Diffstat (limited to 'src/syntax/kind.rs')
| -rw-r--r-- | src/syntax/kind.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/syntax/kind.rs b/src/syntax/kind.rs index d29808d3..02e972c4 100644 --- a/src/syntax/kind.rs +++ b/src/syntax/kind.rs @@ -299,7 +299,9 @@ pub enum ErrorPos { impl SyntaxKind { /// Whether this is trivia. pub fn is_trivia(&self) -> bool { - self.is_space() || matches!(self, Self::LineComment | Self::BlockComment) + self.is_space() + || self.is_error() + || matches!(self, Self::LineComment | Self::BlockComment) } /// Whether this is a space. |
