Documentation ¶
Index ¶
- func BuildAdlAST(str string) (ctree.Tree, antlr.Tree, *antlr.BaseLexer, antlr.TokenStream, errs)
- func QTreeToken(tts antlr.TokenStream, p antlr.Recognizer)
- func VisitADLWi(tr ctree.Tree, vi antlr.ParseTreeVisitor) (antlr.Recognizer, errs)
- func VisitAdlWo(tr ctree.Tree, vi antlr.ParseTreeVisitor) (antlr.Recognizer, errs)
- func WalkADLWi(tr ctree.Tree, list antlr.ParseTreeListener) (antlr.Recognizer, errs)
- func WalkADLWo(tr ctree.Tree, list antlr.ParseTreeListener) (antlr.Recognizer, errs)
- type ADL
- type ADLBuildListener
- type AnnotateAble
- type Annotation
- type Annotations
- type Decl
- type DeclType
- type DiagMessage
- type Error
- type Field
- type Import
- type ImportableAble
- type Json
- type JsonArray
- type JsonNull
- type JsonObj
- type JsonObjs
- type Module
- type Name
- type NewType
- type ScopedName
- type Setable
- type TTType
- type TypeDef
- type TypeExpr
- type TypeRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAdlAST ¶
func QTreeToken ¶
func QTreeToken(tts antlr.TokenStream, p antlr.Recognizer)
func VisitADLWi ¶ added in v1.0.9
func VisitADLWi(tr ctree.Tree, vi antlr.ParseTreeVisitor) (antlr.Recognizer, errs)
func VisitAdlWo ¶
func VisitAdlWo(tr ctree.Tree, vi antlr.ParseTreeVisitor) (antlr.Recognizer, errs)
func WalkADLWi ¶ added in v1.0.9
func WalkADLWi(tr ctree.Tree, list antlr.ParseTreeListener) (antlr.Recognizer, errs)
func WalkADLWo ¶
func WalkADLWo(tr ctree.Tree, list antlr.ParseTreeListener) (antlr.Recognizer, errs)
Types ¶
type ADLBuildListener ¶
type ADLBuildListener struct { *antlr.BaseParseTreeVisitor // contains filtered or unexported fields }
func (*ADLBuildListener) EnterEveryRule ¶
func (v *ADLBuildListener) EnterEveryRule(ctx antlr.ParserRuleContext)
EnterEveryRule is called when any rule is entered.
func (*ADLBuildListener) ExitEveryRule ¶
func (v *ADLBuildListener) ExitEveryRule(ctx antlr.ParserRuleContext)
ExitEveryRule
type AnnotateAble ¶
type AnnotateAble interface {
AddAnnotation(an Annotation)
}
type Annotation ¶
type Annotation struct { Key ScopedName `json:"v1"` Val interface{} `json:"v2"` }
func (*Annotation) Set ¶
func (an *Annotation) Set(val interface{})
type Annotations ¶
type Annotations []Annotation
func (*Annotations) AddAnnotation ¶
func (ans *Annotations) AddAnnotation(an Annotation)
type Decl ¶
type Decl struct { Name string `json:"name"` Version *string `json:"version,omitempty"` Type DeclType `json:"type_"` Annotations `json:"annotations"` }
type DiagMessage ¶
type Error ¶
type Error struct { ctree.TreeNode `json:"-"` Start, Stop antlr.Token Expected []string Received string Annotations `json:"annotations"` }
func (*Error) SetTreeNode ¶ added in v1.0.8
type Field ¶
type Field struct { Name string `json:"name"` SerializedName string `json:"serializedName"` TypeExpr TypeExpr `json:"typeExpr"` Default interface{} `json:"default,omitempty"` Annotations `json:"annotations"` }
type Import ¶
type Import struct { ModuleName *string `json:"moduleName,omitempty"` ScopedName *ScopedName `json:"scopedName,omitempty"` }
type ImportableAble ¶
type ImportableAble interface {
AddImport(Import)
}
type Module ¶
type Module struct { Name string `json:"name"` Imports []Import `json:"imports"` Decls map[string]Decl `json:"decls"` Annotations `json:"annotations"` }
type ScopedName ¶
type TypeRef ¶
type TypeRef struct { Primitive *string `json:"primitive,omitempty"` TypeParam *string `json:"typeParam,omitempty"` Reference *ScopedName `json:"reference,omitempty"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.