This commit is contained in:
nora 2022-07-24 18:22:52 +02:00
parent b74c11987b
commit 475a520de3
8 changed files with 61 additions and 8 deletions

View file

@ -5,7 +5,7 @@ use crate::{
ast::{
Decl, DeclAttr, DeclSpec, Declarator, DirectDeclarator, ExternalDecl, FunctionDef,
FunctionParamDecl, Ident, InitDecl, IntTy, IntTyKind, IntTySignedness, NormalDecl, Stmt,
TypeSpecifier,
TypeSpecifier, TranslationUnit,
},
pre::Punctuator as P,
token::{Keyword as Kw, Token as Tok},
@ -567,7 +567,7 @@ where
pub fn parse_declarations<'src>(
src: impl Iterator<Item = (Tok<'src>, Span)>,
) -> Result<Vec<Spanned<ExternalDecl>>> {
) -> Result<TranslationUnit> {
use peekmore::PeekMore;
let mut parser = Parser {