luaur_compiler/records/compile_error.rs
1extern crate alloc;
2
3use alloc::string::String;
4use luaur_ast::records::location::Location;
5
6#[derive(Debug, Clone)]
7pub struct CompileError {
8 pub(crate) location: Location,
9 pub(crate) message: String,
10}
11
12impl core::fmt::Display for CompileError {
13 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
14 write!(f, "{}", self.message)
15 }
16}
17
18impl std::error::Error for CompileError {}