1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
use super::common::{ImmutableString, Range}; /// A token found while scanning. #[derive(Debug, PartialEq, Clone)] pub enum Token { OpenBrace, CloseBrace, OpenBracket, CloseBracket, Comma, Colon, String(ImmutableString), Boolean(bool), Number(ImmutableString), Null, CommentLine(ImmutableString), CommentBlock(ImmutableString), } /// A token with positional information. pub struct TokenAndRange { pub range: Range, pub token: Token, }