Clean up
This commit is contained in:
parent
82fbf796f3
commit
f50b765c1e
@ -82,15 +82,17 @@ impl<'a> Analyzer<'a> {
|
|||||||
operator,
|
operator,
|
||||||
right,
|
right,
|
||||||
} => {
|
} => {
|
||||||
self.analyze_node(left)?;
|
|
||||||
self.analyze_node(right)?;
|
|
||||||
|
|
||||||
if let BinaryOperator::AddAssign | BinaryOperator::Assign = operator.inner {
|
if let BinaryOperator::AddAssign | BinaryOperator::Assign = operator.inner {
|
||||||
if let Statement::Identifier(_) = left.inner {
|
if let Statement::Identifier(_) = left.inner {
|
||||||
|
self.analyze_node(right)?;
|
||||||
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.analyze_node(left)?;
|
||||||
|
self.analyze_node(right)?;
|
||||||
|
|
||||||
let left_type = left.inner.expected_type(self.variables);
|
let left_type = left.inner.expected_type(self.variables);
|
||||||
let right_type = right.inner.expected_type(self.variables);
|
let right_type = right.inner.expected_type(self.variables);
|
||||||
|
|
||||||
|
@ -272,8 +272,8 @@ impl<'src> Parser<'src> {
|
|||||||
// Add the new property to the map
|
// Add the new property to the map
|
||||||
map_properties.push((*left, *right));
|
map_properties.push((*left, *right));
|
||||||
}
|
}
|
||||||
// Otherwise, the new statement is a block
|
|
||||||
}
|
}
|
||||||
|
// Otherwise, the new statement is a block
|
||||||
} else if let Statement::Block(statements) =
|
} else if let Statement::Block(statements) =
|
||||||
statement.get_or_insert_with(|| Statement::Block(Vec::new()))
|
statement.get_or_insert_with(|| Statement::Block(Vec::new()))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user