direct declarator

This commit is contained in:
nora 2022-06-25 18:12:57 +02:00
parent 908c5c7615
commit 955effd621
2 changed files with 17 additions and 15 deletions

View file

@ -279,11 +279,13 @@ where
/// direct-declarator ( parameter-type-list )
/// direct-declarator ( identifier-listopt )
fn direct_declarator(&mut self) -> Result<Spanned<DirectDeclarator>> {
if let Some((Tok::Ident(name), span)) = eat!(self, Tok::Ident(_)) {
return Ok((DirectDeclarator::Ident((name.to_owned(), span)), span));
let (ident, span) = self.ident()?;
if (eat!(self, Tok::Punct(Punct::ParenOpen))).is_some() {
todo!("haha, no parentheses for you!")
}
todo!()
Ok((DirectDeclarator::Ident((ident, span)), span))
}
// -----------------------