Documentation
¶
Index ¶
- Variables
- func Put(l *Lexer)
- type Description
- type Lexer
- func (l *Lexer) CatchSyntaxError(f func()) (errRes error)
- func (l *Lexer) Consume()
- func (l *Lexer) ConsumeDescription() (d Description)
- func (l *Lexer) ConsumeIdentIntern() string
- func (l *Lexer) ConsumeIdentInternWithLoc() (string, Location)
- func (l *Lexer) ConsumeKeyword(keywords ...string) string
- func (l *Lexer) ConsumeLiteral() string
- func (l *Lexer) ConsumeString() string
- func (l *Lexer) ConsumeToken(expected rune)
- func (l *Lexer) Location() Location
- func (l *Lexer) Peek() rune
- func (l *Lexer) PeekKeyword(keyword string) bool
- func (l *Lexer) SyntaxError(message string)
- type Location
- type ShowType
Constants ¶
This section is empty.
Variables ¶
View Source
var NoDescription = ShowType(3)
View Source
var PossibleDescription = ShowType(0)
View Source
var ShowBlockDescription = ShowType(2)
View Source
var ShowStringDescription = ShowType(1)
Functions ¶
Types ¶
type Description ¶
func (Description) String ¶
func (d Description) String() string
type Lexer ¶
type Lexer struct { SkipDescriptions bool // contains filtered or unexported fields }
func (*Lexer) CatchSyntaxError ¶
func (*Lexer) Consume ¶
func (l *Lexer) Consume()
Consume whitespace and tokens equivalent to whitespace (e.g. commas and comments).
Consumed comment characters will build the description for the next type or field encountered. The description is available from `DescComment()`, and will be reset every time `Consume()` is executed.
func (*Lexer) ConsumeDescription ¶
func (l *Lexer) ConsumeDescription() (d Description)
func (*Lexer) ConsumeIdentIntern ¶
func (*Lexer) ConsumeIdentInternWithLoc ¶
func (*Lexer) ConsumeKeyword ¶
func (*Lexer) ConsumeLiteral ¶
func (*Lexer) ConsumeString ¶
func (*Lexer) ConsumeToken ¶
func (*Lexer) PeekKeyword ¶
func (*Lexer) SyntaxError ¶
Click to show internal directories.
Click to hide internal directories.