Documentation ¶
Index ¶
- Constants
- type ErrLexerInvalidDuration
- type ErrLexerInvalidSize
- type ErrLexerInvalidToken
- type ErrLexerNotInitialized
- type ErrReaderNil
- type HoconLexer
- type HoconParser
- type HoconToken
- type HoconTokenType
- type LexInvalidTokenErr
- type LexLocation
- type LexScannerErr
- type ParserInvalidArrayErr
- type ParserInvalidInputFieldErr
- type ParserInvalidRuneErr
- type ParserInvalidTargetErr
- type ParserInvalidTokenTypeErr
- type ParserUnbalancedParenthesesErr
Constants ¶
View Source
const HASH = 0x23
View Source
const HoconWS = 0x20
View Source
const NL = 0x0A
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrLexerInvalidDuration ¶
type ErrLexerInvalidDuration struct {
// contains filtered or unexported fields
}
func (*ErrLexerInvalidDuration) Error ¶
func (e *ErrLexerInvalidDuration) Error() string
type ErrLexerInvalidSize ¶
type ErrLexerInvalidSize struct {
// contains filtered or unexported fields
}
func (*ErrLexerInvalidSize) Error ¶
func (e *ErrLexerInvalidSize) Error() string
type ErrLexerInvalidToken ¶
type ErrLexerInvalidToken struct { TokenText string LexLocation }
func (*ErrLexerInvalidToken) Error ¶
func (e *ErrLexerInvalidToken) Error() string
type ErrLexerNotInitialized ¶
type ErrLexerNotInitialized struct{}
func (*ErrLexerNotInitialized) Error ¶
func (l *ErrLexerNotInitialized) Error() string
type ErrReaderNil ¶
type ErrReaderNil struct{}
func (*ErrReaderNil) Error ¶
func (e *ErrReaderNil) Error() string
type HoconLexer ¶
type HoconLexer struct {
// contains filtered or unexported fields
}
func NewLexer ¶
func NewLexer(reader io.Reader) (*HoconLexer, error)
NewLexer instantiates a new HoconLexer using the provided io.Reader Returns an error in case of
func (*HoconLexer) Run ¶
func (lexer *HoconLexer) Run() ([]HoconToken, error)
Run returns a list of acceptable tokens for the parser to perform syntactical checking. It is upto the parser to perform concatenation of strings, checking for sequence of tokens, ensuring no dangling tokens are present etc.
Keys are anything to the left of an = or :
Values are unquoted strings and quoted strings to the right of an = or :
A Key/Path expression must always start on a new line
Trailing spaces in Values should be trimmed, unless they are in a quoted string.
type HoconParser ¶
type HoconParser struct {
// contains filtered or unexported fields
}
func (*HoconParser) FieldByName ¶
type HoconToken ¶
type HoconToken struct { Type HoconTokenType Value string LexLocation }
type HoconTokenType ¶
type HoconTokenType uint8
const ( Integer HoconTokenType = iota Float Boolean Identifier Duration Size Key Text LeftBrace RightBrace LeftBracket RightBracket LeftParen RightParen Equals Colon Comma NewLine Other )
type LexInvalidTokenErr ¶
type LexInvalidTokenErr struct { LexLocation // contains filtered or unexported fields }
func (*LexInvalidTokenErr) Error ¶
func (e *LexInvalidTokenErr) Error() string
type LexLocation ¶
type LexLocation struct {
// contains filtered or unexported fields
}
type LexScannerErr ¶
type LexScannerErr struct { LexLocation // contains filtered or unexported fields }
func (*LexScannerErr) Error ¶
func (e *LexScannerErr) Error() string
type ParserInvalidArrayErr ¶
type ParserInvalidArrayErr struct { LexLocation // contains filtered or unexported fields }
func (*ParserInvalidArrayErr) Error ¶
func (err *ParserInvalidArrayErr) Error() string
type ParserInvalidInputFieldErr ¶
type ParserInvalidInputFieldErr struct {
// contains filtered or unexported fields
}
func (*ParserInvalidInputFieldErr) Error ¶
func (err *ParserInvalidInputFieldErr) Error() string
type ParserInvalidRuneErr ¶
type ParserInvalidRuneErr struct { }
func (*ParserInvalidRuneErr) Error ¶
func (err *ParserInvalidRuneErr) Error() string
type ParserInvalidTargetErr ¶
type ParserInvalidTargetErr struct {
// contains filtered or unexported fields
}
func (*ParserInvalidTargetErr) Error ¶
func (err *ParserInvalidTargetErr) Error() string
type ParserInvalidTokenTypeErr ¶
type ParserInvalidTokenTypeErr struct {
// contains filtered or unexported fields
}
func (*ParserInvalidTokenTypeErr) Error ¶
func (err *ParserInvalidTokenTypeErr) Error() string
type ParserUnbalancedParenthesesErr ¶
type ParserUnbalancedParenthesesErr struct {
LexLocation
}
func (*ParserUnbalancedParenthesesErr) Error ¶
func (err *ParserUnbalancedParenthesesErr) Error() string
Click to show internal directories.
Click to hide internal directories.