Documentation ¶
Overview ¶
Package lexer is generated by GoGLL. Do not edit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lexer ¶
type Lexer struct { // I is the input slice of runes I []rune // Tokens is the slice of tokens constructed by the lexer from I Tokens []*token.Token }
Lexer contains both the input slice of runes and the slice of tokens parsed from the input
func New ¶
New constructs a Lexer from a slice of runes.
All contents of the input slice are treated as input text.
func NewFile ¶
NewFile constructs a Lexer created from the input file, fname.
If the input file is a markdown file NewFile process treats all text outside code blocks as whitespace. All text inside code blocks are treated as input text.
If the input file is a normal text file NewFile treats all text in the inputfile as input text.
func (*Lexer) GetLineColumn ¶
GetLineColumn returns the line and column of rune[i] in the input
func (*Lexer) GetLineColumnOfToken ¶
GetLineColumnOfToken returns the line and column of token[i] in the imput