Documentation
¶
Overview ¶
Package lexer provides a Lexer that takes Risor source code as input and outputs a stream of tokens to be consumed by a parser.
Index ¶
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 holds our object-state.
func (*Lexer) GetLineText ¶
GetLineText returns the text of the line containing the given token.
func (*Lexer) Position ¶
Position returns the current read position of the Lexer as a Position object.
func (*Lexer) SetFilename ¶
SetFilename sets the name of the file being read.
type NumberType ¶
type NumberType string
NumberType describes the type of a number that is being lexed.
const ( NumberTypeInvalid NumberType = "invalid" NumberTypeDecimal NumberType = "decimal" NumberTypeHex NumberType = "hex" NumberTypeOctal NumberType = "octal" )
Click to show internal directories.
Click to hide internal directories.