Documentation ¶
Index ¶
- Variables
- func ErrorMacro(rd *Reader) interface{}
- type BadForm
- type DispatchMacro
- type Macro
- type PackageResolver
- type Reader
- func (rd *Reader) AddForm(form *list.Pair, from, to int)
- func (rd *Reader) BadForm(fromOffset, toOffset int) *BadForm
- func (rd *Reader) Bytes() []byte
- func (rd *Reader) Error(offset int, msg string)
- func (rd *Reader) File() *token.File
- func (rd *Reader) FormPos(form *list.Pair) (pos, end token.Pos)
- func (rd *Reader) NextRune() rune
- func (rd *Reader) Offset() int
- func (rd *Reader) Read() interface{}
- func (rd *Reader) ReadDelimitedList(delimiter rune) interface{}
- func (rd *Reader) ReadSourceFile() *SourceFile
- func (rd *Reader) Rune() rune
- func (rd *Reader) SkipSpace()
- func (rd *Reader) Table() *Table
- type SourceFile
- type Table
- func (rt *Table) GetDispatchMacroRune(dispRune, subRune rune) DispatchMacro
- func (rt *Table) GetMacroRune(r rune) (f Macro, terminating bool)
- func (rt *Table) MakeDisptachMacroRune(r rune, terminating bool)
- func (rt *Table) SetDispatchMacroRune(dispRune, subRune rune, f DispatchMacro)
- func (rt *Table) SetMacroRune(r rune, f Macro, terminating bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var StandardTable = &Table{ macroRunes: map[rune]Macro{ '(': listMacro, ')': ErrorMacro, '\'': quoteMacro, ';': lineCommentMacro, '"': stringMacro, '`': quasiquoteMacro, ',': unquoteMacro, }, dispatchMacroRunes: map[rune]map[rune]DispatchMacro{ '#': map[rune]DispatchMacro{ '`': rawStringMacro, '\\': runeMacro, ';': formCommentMacro, '|': blockCommentMacro, }, }, terminating: map[rune]bool{'"': true, '\'': true, '(': true, ')': true, ',': true, ';': true, '`': true}, }
Functions ¶
func ErrorMacro ¶
func ErrorMacro(rd *Reader) interface{}
Types ¶
type DispatchMacro ¶
type PackageResolver ¶
func NewPackageResolver ¶
func NewPackageResolver() *PackageResolver
func (*PackageResolver) EncloseSymbol ¶
func (PackageResolver) ResolveSymbol ¶
func (r PackageResolver) ResolveSymbol(pkg, ident string) (*lib.Symbol, error)
type Reader ¶
type Reader struct { *PackageResolver Errors scanner.ErrorList // contains filtered or unexported fields }
func (*Reader) ReadDelimitedList ¶
func (*Reader) ReadSourceFile ¶
func (rd *Reader) ReadSourceFile() *SourceFile
type SourceFile ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func (*Table) GetDispatchMacroRune ¶
func (rt *Table) GetDispatchMacroRune(dispRune, subRune rune) DispatchMacro
func (*Table) MakeDisptachMacroRune ¶
func (*Table) SetDispatchMacroRune ¶
func (rt *Table) SetDispatchMacroRune(dispRune, subRune rune, f DispatchMacro)
Click to show internal directories.
Click to hide internal directories.