AST - Store variable names as tokens in declarations
This commit is contained in:
parent
90557e6600
commit
157c938395
2 changed files with 4 additions and 4 deletions
src
|
@ -105,7 +105,7 @@ impl Parser {
|
|||
&TokenType::Semicolon,
|
||||
"expected ';' after variable declaration",
|
||||
)?;
|
||||
Ok(ast::StmtNode::VarDecl(name.lexeme, initializer))
|
||||
Ok(ast::StmtNode::VarDecl(name, initializer))
|
||||
}
|
||||
|
||||
/// Parse the following rule:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue