pub struct ASTConverter { /* private fields */ }Expand description
AST must be converted in the following order:
Params -> Block -> Signature
If you convert it from left to right, for example
i = 1
i = i + 1would be converted as follows. This is a mistake.
i = 1
i = i2 + 1The correct conversion is as follows.
i = 1
i2 = i + 1Implementations§
source§impl ASTConverter
impl ASTConverter
pub fn new( cfg: ErgConfig, shadowing: ShadowingMode, comments: CommentStorage, ) -> Self
pub fn convert_program(self, program: ModModule) -> IncompleteArtifact<Module>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ASTConverter
impl RefUnwindSafe for ASTConverter
impl Send for ASTConverter
impl Sync for ASTConverter
impl Unpin for ASTConverter
impl UnwindSafe for ASTConverter
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more