Adding the New function to create a lexer
This commit is contained in:
@@ -6,3 +6,8 @@ type Lexer struct {
|
||||
readPosition int
|
||||
ch byte
|
||||
}
|
||||
|
||||
func New(input string) *Lexer {
|
||||
l := &Lexer{input: input}
|
||||
return l
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user