This repository has been archived on 2024-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
arf/lexer/lexer.go

21 lines
512 B
Go
Raw Normal View History

2022-08-07 13:18:59 -06:00
package lexer
import "github.com/sashakoshka/arf/file"
2022-08-07 13:18:59 -06:00
// LexingOperation holds information about an ongoing lexing operataion.
type LexingOperation struct {
file *file.File
2022-08-08 23:51:56 -06:00
char rune
2022-08-07 13:18:59 -06:00
}
// Tokenize converts a file into a slice of tokens (lexemes)
func Tokenize (file *file.File) (tokens []Token) {
lexer := LexingOperation { }
return lexer.tokenize(file)
}
// tokenize converts a file into a slice of tokens (lexemes)
func (lexer *LexingOperation) tokenize (file *file.File) (tokens []Token) {
return
}