Documentation
¶
Index ¶
Constants ¶
View Source
const ( LiteralBegin = literal_begin LiteralEnd = literal_end )
View Source
const (
LOWEST = 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PositionRange ¶
type PositionRange struct {
Start, End Position
}
func (*PositionRange) String ¶
func (ps *PositionRange) String() string
type Token ¶
type Token int
const ( // Special Tokens ILLEGAL Token = iota EOF COMMENT // ; IDENT // person INT // Unisigned integer or negative integer: -9 / 9 UINT // Unsigned integer: 9 NINT // Negative integer: -9 FLOAT // float; one of float16, float32, float64 FLOAT16 // A number representable as an IEEE 754 half-precision float (major type 7, additional information 25). FLOAT32 // A number representable as an IEEE 754 single-precision float (major type 7, additional information 26). FLOAT64 // A number representable as an IEEE 754 double-precision float (major type 7, additional information 27). TSTR // tstr TEXT // text TEXT_LITERAL // "text" BYTES // bytes BSTR // bstr BOOL // bool TRUE // true FALSE // false NIL // nil NULL // null ANY // any MINUS // - LPAREN // ( LBRACK // [ LBRACE // { RPAREN // ) RBRACK // ] RBRACE // } COMMA // , PERIOD // . COLON // : ASSIGN // = ARROW_MAP // => OPTIONAL // ? TYPE_CHOICE // / GROUP_CHOICE // // TYPE_CHOICE_ASSIGN // /= GROUP_CHOICE_ASSIGN // /= AMPERSAND // & HASH // # LEFT_ANGLE_BRACKET // < RIGHT_ANGLE_BRACKET // > INCLUSIVE_BOUND // .. EXCLUSIVE_BOUND // ... ZERO_OR_MORE // * ONE_OR_MORE // + UNWRAP // ~ SIZE // .size BITS // .bits REGEXP // .regexp CBOR // .cbor CBORSEQ // .cborseq WITHIN // .within AND // .and LT // .lt LE // .le GT // .gt GE // .ge EQ // .eq NE // .ne DEFAULT // .default PLUS // .plus CAT // .cat DET // .det ABNF // .abnf ABNFB // .abnfb FEATURE // .feature UNEXPECTED // Unexpected Token EOL // End of Line )
The list of tokens
func (Token) IsControlOp ¶
func (Token) Precedence ¶
Precedence returns the token's precedence used to built the ast in parsing
Click to show internal directories.
Click to hide internal directories.