pub struct TypeChecker { /* private fields */ }Expand description
The static type checker.
Implementations§
Source§impl TypeChecker
impl TypeChecker
pub fn new() -> Self
Sourcepub fn check_with_source(
self,
program: &[SNode],
source: &str,
) -> Vec<TypeDiagnostic>
pub fn check_with_source( self, program: &[SNode], source: &str, ) -> Vec<TypeDiagnostic>
Check a program with source text for autofix generation.
Sourcepub fn check(self, program: &[SNode]) -> Vec<TypeDiagnostic>
pub fn check(self, program: &[SNode]) -> Vec<TypeDiagnostic>
Check a program and return diagnostics.
Sourcepub fn check_with_hints(
self,
program: &[SNode],
source: &str,
) -> (Vec<TypeDiagnostic>, Vec<InlayHintInfo>)
pub fn check_with_hints( self, program: &[SNode], source: &str, ) -> (Vec<TypeDiagnostic>, Vec<InlayHintInfo>)
Check a program and return both diagnostics and inlay hints.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeChecker
impl RefUnwindSafe for TypeChecker
impl Send for TypeChecker
impl Sync for TypeChecker
impl Unpin for TypeChecker
impl UnsafeUnpin for TypeChecker
impl UnwindSafe for TypeChecker
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