Documentation
¶
Overview ¶
Package lexer provides a lexical scanner for the oh language.
The oh lexer adapts the state function approach used by Go's text/template lexer and described in detail in Rob Pike's talk "Lexical Scanning in Go". See https://talks.golang.org/2011/lex.slide for more information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
T holds the state of the scanner.
func (*T) Copy ¶
Copy makes a copy of the lexer with its own token channel. A copy is useful for doing partial parses for command completion.
func (*T) Scan ¶
Scan passes a text buffer to the lexer for scanning. If a buffer is currently being scanned, the new buffer will be appended to the list of buffers waiting to be scanned.
Click to show internal directories.
Click to hide internal directories.