mirror of
https://github.com/AleoHQ/leo.git
synced 2024-09-21 12:07:56 +03:00
AST cleanup
This commit is contained in:
parent
4b3b4a83ff
commit
707cd3cfce
@ -65,7 +65,7 @@ pub trait ExpressionReconstructor {
|
||||
index: tuple.index,
|
||||
span: tuple.span,
|
||||
}),
|
||||
expr => expr,
|
||||
AccessExpression::AssociatedConstant(constant) => AccessExpression::AssociatedConstant(constant),
|
||||
}),
|
||||
Default::default(),
|
||||
)
|
||||
@ -255,12 +255,13 @@ pub trait StatementReconstructor: ExpressionReconstructor {
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: Reconstructor should visit this.
|
||||
fn reconstruct_decrement(&mut self, input: DecrementStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
(
|
||||
Statement::Decrement(DecrementStatement {
|
||||
mapping: input.mapping,
|
||||
index: input.index,
|
||||
amount: input.amount,
|
||||
index: input.index,
|
||||
span: input.span,
|
||||
}),
|
||||
Default::default(),
|
||||
@ -290,6 +291,7 @@ pub trait StatementReconstructor: ExpressionReconstructor {
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: Reconstructor should visit this.
|
||||
fn reconstruct_increment(&mut self, input: IncrementStatement) -> (Statement, Self::AdditionalOutput) {
|
||||
(
|
||||
Statement::Increment(IncrementStatement {
|
||||
|
@ -25,6 +25,7 @@ use std::fmt;
|
||||
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize, Debug)]
|
||||
pub struct AssignStatement {
|
||||
/// The place to assign to.
|
||||
/// Note that `place` can either be an identifier or tuple.
|
||||
pub place: Expression,
|
||||
/// The value to assign to the `assignee`.
|
||||
pub value: Expression,
|
||||
|
Loading…
Reference in New Issue
Block a user