Skip to main content

token2str

Function token2str 

Source
pub fn token2str(ls: &LexState, token: i32) -> Vec<u8> ⓘ
Expand description

Produce a human-readable token description (for error messages and the parser).

Single-byte printable tokens are formatted as 'X'; non-printable as '<\N>'. Reserved words and multi-char symbols are formatted as 'kw'. Literal tokens (<name>, <string>, etc.) return the bare label.