Support tokenization tooltips in the C# mod

This commit is contained in:
2025-12-02 00:00:42 -07:00
parent 8aadb95f36
commit 0f1613d521
3 changed files with 14 additions and 2 deletions

View File

@@ -88,6 +88,15 @@ pub enum TokenType {
EOF,
}
impl Documentation for TokenType {
fn docs(&self) -> String {
match self {
Self::Keyword(k) => k.docs(),
_ => "".into(),
}
}
}
impl From<TokenType> for u32 {
fn from(value: TokenType) -> Self {
use TokenType::*;