pub struct Context<'a> {
pub interner: &'a Interner,
pub std: Std,
pub gnu: bool,
pub pedantic: bool,
pub error_limit: usize,
}Expand description
Everything the parser needs that is not the tokens.
Fields§
§interner: &'a InternerThe spellings, for the diagnostics that name an identifier.
std: StdThe dialect, which decides whether an old-style definition is an error and whether a C23 construct is one.
gnu: boolWhether the GNU extensions are on, which is -std=gnu17 rather than -std=c17.
pedantic: boolWhether -pedantic was given.
error_limit: usizeHow many errors to report before stopping, with zero meaning no limit.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Context<'a>
impl<'a> RefUnwindSafe for Context<'a>
impl<'a> Send for Context<'a>
impl<'a> Sync for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnsafeUnpin for Context<'a>
impl<'a> UnwindSafe for Context<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more