Added lexer stub
This commit is contained in:
parent
68a6bdf511
commit
47234e9f36
21
lexer/lexer.go
Normal file
21
lexer/lexer.go
Normal file
@ -0,0 +1,21 @@
|
||||
package lexer
|
||||
|
||||
import (
|
||||
"github.com/sashakoshka/arf/file"
|
||||
)
|
||||
|
||||
// LexingOperation holds information about an ongoing lexing operataion.
|
||||
type LexingOperation struct {
|
||||
file *file.File
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
Reference in New Issue
Block a user