gcg-parser 0.5.1

Parser and Data Structures for the GCG file format
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use displaydoc::Display;
use thiserror::Error;

#[derive(Display, Error, Debug)]
pub enum Error {
	/// Missing token {token:?} in position {token_index:?}: {text:?}
	MissingToken {
		token: String,
		/// 1 indexed
		token_index: usize,
		text: String,
	},
	/// Invalid token {token:?}: {text:?}
	InvalidToken { token: String, text: String },
}

pub type Result<T> = core::result::Result<T, Error>;