Add fallback to constant tokens for numbers

This commit is contained in:
Marshall Bowers 2023-12-08 13:20:00 -05:00
parent ab5b76e943
commit 62155f3a88
3 changed files with 50 additions and 0 deletions

View file

@ -167,6 +167,7 @@ impl ZedSyntaxToken {
pub fn fallbacks(&self) -> &[Self] {
match self {
ZedSyntaxToken::CommentDoc => &[ZedSyntaxToken::Comment],
ZedSyntaxToken::Number => &[ZedSyntaxToken::Constant],
ZedSyntaxToken::VariableSpecial => &[ZedSyntaxToken::Variable],
ZedSyntaxToken::PunctuationBracket
| ZedSyntaxToken::PunctuationDelimiter