Documentation ¶
Index ¶
- Constants
- Variables
- func ParseLine(line string, state ParseState) (*Def, ParseState, error)
- func ToGoName(s string) string
- type Alterations
- type Arg
- type Comb
- type Def
- type ParseOptions
- type ParseState
- type Priority
- type Schema
- func (sch *Schema) ByName(name string) *Comb
- func (sch *Schema) ByTag(tag uint32) *Comb
- func (sch *Schema) Combs() []*Comb
- func (sch *Schema) Funcs() []*Comb
- func (sch *Schema) Parse(text string, options ParseOptions) error
- func (sch *Schema) Type(name string) *Type
- func (sch *Schema) Types() []*Type
- type ScopedName
- type Type
- type TypeExpr
Constants ¶
View Source
const ( PriorityNormal Priority = 0 PriorityJustADefault = -10 PriorityOverride = 10 )
View Source
const Natural = "#"
Variables ¶
View Source
var ErrWeirdDef = errors.New("this line is best ignored")
Functions ¶
func ParseLine ¶
func ParseLine(line string, state ParseState) (*Def, ParseState, error)
Types ¶
type Alterations ¶
type Def ¶
type Def struct { Tag uint32 CombName ScopedName IsFunc bool IsInternal bool IsQuestionMark bool IsWeird bool OriginalStr string GenericArgs []Arg Args []Arg ResultType TypeExpr }
func (*Def) Alter ¶
func (d *Def) Alter(alter *Alterations)
func (Def) CanonicalString ¶
type ParseOptions ¶
type ParseState ¶
type ParseState struct {
InsideFuncs bool
}
type ScopedName ¶
type ScopedName struct {
// contains filtered or unexported fields
}
func MakeScopedName ¶
func MakeScopedName(s string) ScopedName
func MakeScopedNameComponents ¶
func MakeScopedNameComponents(scope, short string) ScopedName
func (*ScopedName) Alter ¶
func (n *ScopedName) Alter(alter *Alterations)
func (ScopedName) Full ¶
func (n ScopedName) Full() string
func (ScopedName) GoName ¶
func (n ScopedName) GoName() string
func (ScopedName) HasScope ¶
func (n ScopedName) HasScope() bool
func (ScopedName) IsBare ¶
func (n ScopedName) IsBare() bool
func (ScopedName) Scope ¶
func (n ScopedName) Scope() string
func (ScopedName) Short ¶
func (n ScopedName) Short() string
func (ScopedName) String ¶
func (n ScopedName) String() string
type TypeExpr ¶
type TypeExpr struct { IsBang bool IsPercent bool Name ScopedName GenericArgs []TypeExpr }
func (*TypeExpr) Alter ¶
func (t *TypeExpr) Alter(alter *Alterations)
func (TypeExpr) CanonicalString ¶
func (TypeExpr) IsJustTypeName ¶
Click to show internal directories.
Click to hide internal directories.