Documentation ¶ Index ¶ type Lexer func New(input string) *Lexer func (l *Lexer) NextToken() token.Token Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Lexer ¶ type Lexer struct { // contains filtered or unexported fields } Lexer defines properties required to turn source code into tokens func New ¶ func New(input string) *Lexer New returns a new lexer for the input. It also reads the first character of the input and advances the read position to the next character. func (*Lexer) NextToken ¶ func (l *Lexer) NextToken() token.Token NextToken returns the next token in the input. it converts the input character to a token It then advanced the read position so the next call to NextToken will return the next token in the input. finally, it returns the token Source Files ¶ View all Source files lexer.go Click to show internal directories. Click to hide internal directories.