Update compiler/parser/src/parser/file.rs

Co-authored-by: d0cd <pranavsaig@gmail.com>
Signed-off-by: evan-schott <53463459+evan-schott@users.noreply.github.com>
This commit is contained in:
evan-schott 2023-10-03 14:35:00 -07:00
parent 141bca35c4
commit 909289c83c

View File

@ -146,8 +146,8 @@ impl ParserContext<'_> {
while self.has_next() {
match &self.token.token {
Token::Const => {
let definition = self.parse_const_declaration_statement()?;
consts.push((Symbol::intern(&definition.place.to_string()), definition));
let declaration = self.parse_const_declaration_statement()?;
consts.push((Symbol::intern(&declaration.place.to_string()), definition));
}
Token::Struct | Token::Record => {
let (id, struct_) = self.parse_struct()?;