Documentation ¶
Overview ¶
Package thriftfile implements a parser for .thrift files.
Index ¶
- type Annotation
- type AnnotationList
- type BadDef
- type Const
- type Def
- type Enum
- type EnumValue
- type EnumValueList
- type Field
- type FieldList
- type File
- type Float
- type Header
- type Ident
- type Include
- type Int
- type KeyValuePair
- type KeyValuePairList
- type List
- type Map
- type Method
- type MethodList
- type Namespace
- type Node
- type Service
- type Set
- type String
- type Struct
- type Type
- type TypeRef
- type Typedef
- type Value
- type ValueList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct { Name *Ident Value *String // may be nil // contains filtered or unexported fields }
An Annotation represents an annotation.
type AnnotationList ¶
type AnnotationList struct { List []*Annotation // contains filtered or unexported fields }
An AnnotationList node represents a list of annotations enclosed by parentheses.
type BadDef ¶
A BadDef node is a placeholder for a definition containing syntax errors for which a correct definition node cannot be created.
type Def ¶
type Def interface { Node // contains filtered or unexported methods }
A Def represents a definition node.
type Enum ¶
type Enum struct { Name *Ident Values *EnumValueList Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
An Enum node represents an enum definition.
type EnumValue ¶
type EnumValue struct { Name *Ident Value *Int // may be nil Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
An EnumValue node represents an enum value definition.
type EnumValueList ¶
type EnumValueList struct { List []*EnumValue // contains filtered or unexported fields }
An EnumValueList node represents a list of enum value definitions enclosed by curly braces.
type Field ¶
type Field struct { ID *Int // may be nil Required bool Optional bool Type Type Reference bool Name *Ident Default Value // may be nil Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A Field node represents a field definition.
type FieldList ¶
type FieldList struct { List []*Field // contains filtered or unexported fields }
A FieldList node represents a list of field definitions enclosed by curly braces or parentheses.
type Float ¶
type Float struct { Value string // contains filtered or unexported fields }
A Float node represents a floating-point literal.
type Header ¶
type Header interface { Node // contains filtered or unexported methods }
A Header represents a header node.
type Ident ¶
type Ident struct { Name string // contains filtered or unexported fields }
An Ident node represents an identifier.
type Include ¶
type Include struct { Path *String // contains filtered or unexported fields }
An Include node represents an include header.
type Int ¶
type Int struct { Value string // contains filtered or unexported fields }
An Int node represents an integer literal.
type KeyValuePair ¶
type KeyValuePair struct {
Key, Value Value
// contains filtered or unexported fields
}
A KeyValuePair node represents a key-value pair.
type KeyValuePairList ¶
type KeyValuePairList struct { List []*KeyValuePair // contains filtered or unexported fields }
A KeyValuePairList node represents a list of key-value pairs enclosed by curly braces.
type List ¶
type List struct { Element Type Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A List node represents a list type.
type Map ¶
type Map struct { Key Type Value Type Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A Map node represents a map type.
type Method ¶
type Method struct { OneWay bool Void bool Return Type // may be nil Name *Ident Arguments *FieldList Throws *FieldList // may be nil Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A Method node represents a method definition.
type MethodList ¶
type MethodList struct { List []*Method // contains filtered or unexported fields }
A MethodList node represents a list of method definitions enclosed by curly braces.
type Namespace ¶
type Namespace struct { Scope *Ident // nil means all scopes Name *Ident Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A Namespace node represents a namespace header.
type Node ¶
type Node interface {
// contains filtered or unexported methods
}
A Node represents a syntax tree node.
type Service ¶
type Service struct { Name *Ident Extends *Ident // may be nil Methods *MethodList Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A Service node represents a service definition.
type Set ¶
type Set struct { Element Type Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A Set node represents a set type.
type String ¶
type String struct { Value string // contains filtered or unexported fields }
A String node represents a string literal.
type Struct ¶
type Struct struct { Union bool Exception bool Name *Ident Fields *FieldList Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A Struct node represents a struct-like definition.
type Type ¶
type Type interface { Node // contains filtered or unexported methods }
A Type represents a type node.
type TypeRef ¶
type TypeRef struct { Name *Ident Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A TypeRef node represents a type reference.
type Typedef ¶
type Typedef struct { Type Type Name *Ident Annotations *AnnotationList // may be nil // contains filtered or unexported fields }
A Typedef node represents a type definition.