Documentation ¶
Index ¶
- type Parser
- func (p *Parser) ParseEnd() error
- func (p *Parser) ParseInt() (tok int, lit int, absolute bool, err error)
- func (p *Parser) ParseUnsignedFloat() (float64, error)
- func (p *Parser) ParseWhitespace() error
- func (p *Parser) Scan() (tok int, lit string)
- func (p *Parser) ScanIgnoreWhitespace() (tok int, lit string)
- func (p *Parser) ScanRemainderAsIdentifier() string
- func (p *Parser) Scanned() []Token
- func (p *Parser) SetScanner(s *lexer.Scanner)
- func (p *Parser) Unscan()
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
Parser represents a parser.
func (*Parser) ParseEnd ¶
ParseEnd parses to the end, and returns an error if the end hasn't been reached.
func (*Parser) ParseInt ¶
ParseInt parses the next integer. The integer might be absolute, or a delta value such as -2 or +3.
func (*Parser) ParseUnsignedFloat ¶
func (*Parser) ParseWhitespace ¶
ParseWhitespace scans a whitespace token returning nil, or error if the next token is not whitespace.
func (*Parser) Scan ¶
Scan returns the next token from the underlying scanner. If a token has been unscanned then read that instead.
func (*Parser) ScanIgnoreWhitespace ¶
ScanIgnoreWhitespace scans the next non-whitespace token.
func (*Parser) ScanRemainderAsIdentifier ¶
func (*Parser) SetScanner ¶
SetScanner assigns a scanner object to the parser.
Click to show internal directories.
Click to hide internal directories.