Documentation
¶
Index ¶
Constants ¶
View Source
const LexicalError = Tok(-1)
LexicalError .
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Tok ¶
type Tok int
Tok .
const ( EOF Tok = iota BlockComment // /\*(?:\*[^/]|[^*])*\*/ LineComment // //[^\n]* UnixComment // #[^\n]* Whitespaces // \t\v\r NewLine // \r?\n Bool // bool Byte // byte I8 // i8 I16 // i16 I32 // i32 I64 // i64 Double // double String // string Binary // binary Const // const Oneway // oneway Typedef // typedef Map // map Set // set List // list Void // void Throws // throws Exception // exception Extends // extends Required // required Optional // optional Service // service Struct // struct Union // union Enum // enum Include // include CppInclude // cpp_include Namespace // namespace Asterisk // * LBracket // [ RBracket // ] LBrace // { RBrace // } LParenthesis // ( RParenthesis // ) LChevron // < RChevron // > Equal // = Comma // , Colon // : Semicolon // ; StringLiteral // '(?:\\'|[^'])*'|"(?:\\"|[^"])*" Identifier // [_a-zA-Z][_a-zA-Z0-9]*(?:\.[_a-zA-Z][_a-zA-Z0-9]*)* IntLiteral // [-+]?(?:0x[0-9a-fA-F]+|0o[0-7]+|0|[1-9][0-9]*) FloatLiteral // )
Toks .
type Token ¶
Token is the set of lexical tokens of the thrift IDL.
type Tokenizer ¶
type Tokenizer struct {
Span
// contains filtered or unexported fields
}
Tokenizer is a lexical analyzer for thrift IDL.
func NewTokenizer ¶
NewTokenizer returns a Tokenizer over the given source.
Click to show internal directories.
Click to hide internal directories.