pub struct CompilationUnit {
pub filename: String,
pub source: String,
pub parse_ok: bool,
pub error_count: usize,
}Expand description
A compilation unit consisting of source file, AST, and errors.
Fields§
§filename: StringThe source filename
source: StringThe source text
parse_ok: boolWhether parsing succeeded
error_count: usizeNumber of errors
Implementations§
Source§impl CompilationUnit
impl CompilationUnit
Sourcepub fn mark_parsed(self) -> Self
pub fn mark_parsed(self) -> Self
Mark as successfully parsed.
Sourcepub fn with_errors(self, count: usize) -> Self
pub fn with_errors(self, count: usize) -> Self
Mark with errors.
Auto Trait Implementations§
impl Freeze for CompilationUnit
impl RefUnwindSafe for CompilationUnit
impl Send for CompilationUnit
impl Sync for CompilationUnit
impl Unpin for CompilationUnit
impl UnsafeUnpin for CompilationUnit
impl UnwindSafe for CompilationUnit
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