forked from M-Labs/nac3
nac3parser: modify to handle UAdd in front of int constant
This commit is contained in:
parent
60b3807ab3
commit
e266d3c2b0
|
@ -923,6 +923,9 @@ Factor: ast::Expr = {
|
||||||
kind: kind.clone()
|
kind: kind.clone()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
(ast::Unaryop::UAdd, ast::ExprKind::Constant { value: Constant::Int(val), kind }) => {
|
||||||
|
ast::ExprKind::Constant { value: Constant::Int(*val), kind: kind.clone() }
|
||||||
|
}
|
||||||
_ => ast::ExprKind::UnaryOp { operand: Box::new(e), op }
|
_ => ast::ExprKind::UnaryOp { operand: Box::new(e), op }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue