aboutsummaryrefslogtreecommitdiff
path: root/parser
diff options
context:
space:
mode:
authorBobby <[email protected]>2023-11-03 12:58:02 +0000
committerBobby <[email protected]>2023-11-03 12:58:02 +0000
commit955fdfb79f165bab521cf4f4e0e18613fd1f085b (patch)
tree9bd3474cfa7f5552f5df8a4f0fe47095261ebc49 /parser
parent895fd381cc3867bb362f1abf19ffc26c41cbdbe7 (diff)
downloadmana-955fdfb79f165bab521cf4f4e0e18613fd1f085b.tar.xz
mana-955fdfb79f165bab521cf4f4e0e18613fd1f085b.zip
fmt:source tree
Diffstat (limited to 'parser')
-rw-r--r--parser/parser.go3
-rw-r--r--parser/parser_test.go3
2 files changed, 2 insertions, 4 deletions
diff --git a/parser/parser.go b/parser/parser.go
index bd587de..df15165 100644
--- a/parser/parser.go
+++ b/parser/parser.go
@@ -20,7 +20,7 @@ type Parser struct {
// New returns a new Parser.
func New(l *lexer.Lexer) *Parser {
var p *Parser = &Parser{
- l: l,
+ l: l,
errors: []string{},
}
@@ -147,4 +147,3 @@ func (p *Parser) peekError(t tokens.TokenType) {
p.errors = append(p.errors, msg)
}
-
diff --git a/parser/parser_test.go b/parser/parser_test.go
index 0e27b51..8e06ecd 100644
--- a/parser/parser_test.go
+++ b/parser/parser_test.go
@@ -1,9 +1,9 @@
package parser
import (
- "testing"
"mana/ast"
"mana/lexer"
+ "testing"
)
func TestLetStatements(t *testing.T) {
@@ -90,7 +90,6 @@ func testLetStatement(t *testing.T, s ast.Statement, name string) bool {
return true
}
-
// Return statement tests.
func TestReturnStatements(t *testing.T) {
var input string = `