This commit is contained in:
Shunsuke Shibayama 2022-10-18 17:17:56 +09:00
parent afcf21787d
commit ae15f95191
7 changed files with 159 additions and 57 deletions

View file

@ -33,6 +33,10 @@ impl LexError {
Self(core)
}
pub fn set_hint<S: Into<AtomicStr>>(&mut self, hint: S) {
self.0.hint = Some(hint.into());
}
pub fn compiler_bug(errno: usize, loc: Location, fn_name: &str, line: u32) -> Self {
Self::new(ErrorCore::new(
errno,