Documentation
¶
Overview ¶
Code generated by parser-gen. DO NOT EDIT.
Package parser represents the parser.Interface and some errors for implementing parsers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotBool = fmt.Errorf("value is not a bool")
ErrNotBool is an error that represents a type error.
var ErrNotBytes = fmt.Errorf("value is not a bytes")
ErrNotBytes is an error that represents a type error.
var ErrNotDouble = fmt.Errorf("value is not a double")
ErrNotDouble is an error that represents a type error.
var ErrNotInt = fmt.Errorf("value is not a int")
ErrNotInt is an error that represents a type error.
var ErrNotString = fmt.Errorf("value is not a string")
ErrNotString is an error that represents a type error.
var ErrNotUint = fmt.Errorf("value is not a uint")
ErrNotUint is an error that represents a type error.
Functions ¶
Types ¶
type Interface ¶
A type conforming to the parser.Interface interface, abstracts away the implementation details of a parser.
type Value ¶
type Value interface { Double() (float64, error) Int() (int64, error) Uint() (uint64, error) Bool() (bool, error) String() (string, error) Bytes() ([]byte, error) }
A type confirming to the parser.Value interface, repesents one native value, tree node label (field name) or some repesentation a node label. Typically only one of the methods returns a value without an error, but more than one method can return without an error. For example a positive json number can return an errorless value for the Double, Int and Uint methods.
Directories
¶
Path | Synopsis |
---|---|
The debug package is great for testing and debugging of parser.Interface implementations.
|
The debug package is great for testing and debugging of parser.Interface implementations. |
debug-gen
Command debug-gen generates some of the code in the debug package.
|
Command debug-gen generates some of the code in the debug package. |
Package json contains the implementation of a JSON parser.
|
Package json contains the implementation of a JSON parser. |
Command parser-gen generates some of the code in the parser package.
|
Command parser-gen generates some of the code in the parser package. |
Package proto contains an implementation of a protocol buffer parser.
|
Package proto contains an implementation of a protocol buffer parser. |
prototests
Package prototests contains some structures and values that are useful for testing the protocol buffer parser.
|
Package prototests contains some structures and values that are useful for testing the protocol buffer parser. |
Package reflect contains an implementation of a parser for a reflected go structure.
|
Package reflect contains an implementation of a parser for a reflected go structure. |
Package xml contains a parser for XML.
|
Package xml contains a parser for XML. |