Skip to content

Commit b1131bd

Browse files
committed
Fixed issue with parsed C AST not using same AST as parser
1 parent 78bb899 commit b1131bd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/c/parser/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,11 @@ impl<'input, 'diagnostics> Parser<'input, 'diagnostics> {
8181
}
8282

8383
pub fn parse(&mut self) -> Result<(), ParseError> {
84-
let mut ast_file = AstFile::new();
85-
8684
while !self.input.peek().is_end_of_file() {
8785
let external_declaration = self.parse_external_declaration()?;
8886

8987
let mut ctx = TranslateCtx {
90-
ast_file: &mut ast_file,
88+
ast_file: &mut self.ast_file,
9189
typedefs: &mut self.typedefs,
9290
diagnostics: self.diagnostics,
9391
};

0 commit comments

Comments
 (0)