Documentation
¶
Index ¶
- type CompileStatus
- type FileLocationProvider
- type ParserState
- func (state *ParserState) AtEndOfStream() bool
- func (state *ParserState) Checkpoint() int
- func (state *ParserState) Choose(children ...func() bool) bool
- func (state *ParserState) Consume() bool
- func (state *ParserState) ConsumeRange(min rune, max rune) bool
- func (state *ParserState) ConsumeRune(value rune) bool
- func (state *ParserState) Current() rune
- func (state *ParserState) Deepest() int
- func (state *ParserState) Optional(child func() bool)
- func (state *ParserState) Pos() int
- func (state *ParserState) Repeat(min int, body func() bool) bool
- func (state *ParserState) Restore(pos int)
- func (state *ParserState) Slice(begin int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompileStatus ¶
type CompileStatus interface { Error(text string) LocationError(loc int, text string) ErrorOccured() bool }
func MakeCompileStatus ¶
func MakeCompileStatus(loc *FileLocationProvider, out io.Writer) CompileStatus
type FileLocationProvider ¶
type FileLocationProvider struct {
// contains filtered or unexported fields
}
func MakeFileLocationProvider ¶
func MakeFileLocationProvider(filename string, data []byte) *FileLocationProvider
func (*FileLocationProvider) GetLocationInfo ¶
type ParserState ¶
type ParserState struct {
// contains filtered or unexported fields
}
func MakeParserState ¶
func MakeParserState(stream []byte) *ParserState
func (*ParserState) AtEndOfStream ¶
func (state *ParserState) AtEndOfStream() bool
func (*ParserState) Checkpoint ¶
func (state *ParserState) Checkpoint() int
func (*ParserState) Choose ¶
func (state *ParserState) Choose(children ...func() bool) bool
func (*ParserState) Consume ¶
func (state *ParserState) Consume() bool
func (*ParserState) ConsumeRange ¶
func (state *ParserState) ConsumeRange(min rune, max rune) bool
func (*ParserState) ConsumeRune ¶
func (state *ParserState) ConsumeRune(value rune) bool
func (*ParserState) Current ¶
func (state *ParserState) Current() rune
func (*ParserState) Deepest ¶
func (state *ParserState) Deepest() int
func (*ParserState) Optional ¶
func (state *ParserState) Optional(child func() bool)
func (*ParserState) Pos ¶
func (state *ParserState) Pos() int
func (*ParserState) Restore ¶
func (state *ParserState) Restore(pos int)
func (*ParserState) Slice ¶
func (state *ParserState) Slice(begin int) string
Click to show internal directories.
Click to hide internal directories.