summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tews <git@tews.dev>2024-07-05 06:07:35 +0200
committerMichael Tews <michael@tews.dev>2026-04-12 11:11:02 +0200
commit1bc69408bc34a450003d2b1a1f045a8406747135 (patch)
tree584d7357791a3af4442c496f4c80b279738a9cab
parent88a76bb57b07cb15e546f787d4a63dad75106c10 (diff)
fix!: New() returns *Lexer
-rw-r--r--lexer/lexer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexer/lexer.go b/lexer/lexer.go
index 807d3f0..4945adf 100644
--- a/lexer/lexer.go
+++ b/lexer/lexer.go
@@ -9,10 +9,10 @@ type Lexer struct {
ch byte // current char
}
-func New(input string) Lexer {
+func New(input string) *Lexer {
l := Lexer{input: input}
l.readChar()
- return l
+ return &l
}
func (l *Lexer) NextToken() token.Token {