comments
Some checks failed
Build / build (push) Failing after 1m10s
Test / build (push) Failing after 11m40s

This commit is contained in:
Chuck Smith
2024-03-16 19:31:23 -04:00
parent 7463b3af39
commit 83ad72a7fc
7 changed files with 106 additions and 6 deletions

View File

@@ -153,6 +153,8 @@ func (p *Parser) parseStatement() ast.Statement {
}
switch p.curToken.Type {
case token.COMMENT:
return p.parseComment()
case token.LET:
return p.parseLetStatement()
case token.RETURN:
@@ -542,3 +544,7 @@ func (p *Parser) parseAssignmentStatement() ast.Statement {
return stmt
}
func (p *Parser) parseComment() ast.Statement {
return &ast.Comment{Token: p.curToken, Value: p.curToken.Literal}
}