pub fn to_token_char(&self, lang: Option<Language>) -> char {
        match *self {
            TokenKind::Unknown(c) => c,
            TokenKind::MissingLanguageToken(_, c) => c,
            _ => LOOKUP
                .iter()
                .filter(|(l, _, t)| Some(*l) == lang && t == self)
                .nth(0)
                .map(|(_, c, _)| *c)
                .unwrap_or(match lang {
                    Some(Language::SVG) => self.to_token_char(Some(Language::XML)),
                    _ => ' ',
                }),
        }
    }
/// Calculate the character given an optional language and kind
Calculate the character given an optional language and kind
Calculate the character given an optional language and kind
pub fn to_token_char(&self, lang: Option<Language>) -> char {
        match *self {
            TokenKind::Unknown(c) => c,
            TokenKind::MissingLanguageToken(_, c) => c,
            _ => LOOKUP
                .iter()
                .filter(|(l, _, t)| Some(*l) == lang && t == self)
                .nth(0)
                .map(|(_, c, _)| *c)
                .unwrap_or(match lang {
                    Some(Language::SVG) => self.to_token_char(Some(Language::XML)),
                    _ => ' ',
                }),
        }
    }
pub fn to_token_char ( & self , lang : Option < Language > ) -> char { match * self { TokenKind :: Unknown ( c ) => c , TokenKind :: MissingLanguageToken ( _ , c ) => c , _ => LOOKUP . iter ( ) . filter ( | ( l , _ , t ) | Some ( * l ) == lang && t == self ) . nth ( 0 ) . map ( | ( _ , c , _ ) | * c ) . unwrap_or ( match lang { Some ( Language :: SVG ) => self . to_token_char ( Some ( Language :: XML ) ) , _ => ' ' , } ) , } }
Calculate the character given an optional language and kind
Calculate the character given an optional language and kind
&self
lang
Option<Language>
&self
lang
Option<Language>