package lexer
import "github.com/irfansharif/solver/internal/testutils/parser/lexer"
Index ¶
Types ¶
type Lexer ¶
type Lexer struct {
// contains filtered or unexported fields
}
Lexer converts an input string into its constituent tokens.
func New ¶
New creates a lexer from the given input.
func (*Lexer) Index ¶
Index returns the current position of the lexer.
func (*Lexer) Next ¶
Next returns the next token from the input and moves the current position of the lexer ahead.
If encountering the end of the input, token.EOF is returned.
func (*Lexer) Reposition ¶
Reposition positions the lexer to the given index.
Source Files ¶
- Version
- v0.0.0-20220713194315-9c33ad307075 (latest)
- Published
- Jul 13, 2022
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 3 weeks ago –
Tools for package owners.