Skip to content

Commit 17bfeb3

Browse files
committed
Added '+' C unary operator
1 parent dfacf3a commit 17bfeb3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/c/parser/expr.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,12 @@ impl<'input, 'diagnostics> Parser<'input, 'diagnostics> {
247247
let inner = self.parse_expr_primary()?;
248248
return Ok(ExprKind::Dereference(Box::new(inner)).at(source));
249249
}
250-
CTokenKind::Punctuator(Punctuator::Add) => todo!(),
250+
CTokenKind::Punctuator(Punctuator::Add) => {
251+
// Is this a no-op?
252+
self.input.advance();
253+
let inner = self.parse_expr_primary()?;
254+
return Ok(inner);
255+
}
251256
CTokenKind::Punctuator(Punctuator::Subtract) => {
252257
self.input.advance();
253258
let inner = self.parse_expr_primary()?;

0 commit comments

Comments
 (0)