1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use displaydoc::Display;
use thiserror::Error;

#[derive(Display, Error, Debug)]
#[allow(clippy::module_name_repetitions)]
pub enum GcgError {
	/// Missing token {token:?} in position {position:?}: {text:?}
	MissingToken {
		token: String,
		/// A 1 indexed position of the tokens
		position: usize,
		text: String,
	},
}

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