Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AnnotationRules = On(Any).Self( On(Not(intellij.File)).Error(ErrRootMustBeFile.New()), On(intellij.File).Roles(uast.File).Descendants( On(intellij.Comment).Roles(uast.Comment), On(intellij.Shebang).Roles(uast.Comment, uast.Documentation), On(intellij.VarDefElement).Children( On(intellij.AssignmentWord).Roles(uast.Identifier), ), On(intellij.FunctionDefElement).Children( On(intellij.Function).Roles(uast.Function, uast.Declaration), On(intellij.NamedSymbol).Roles(uast.Function, uast.Declaration, uast.Name), On(intellij.GroupElement).Roles(uast.Function, uast.Declaration, uast.Body, uast.Block), ), On(intellij.IfShellCommand).Roles(uast.If, uast.Statement), On(intellij.ForShellCommand).Roles(uast.For, uast.Statement), On(intellij.WhileLoop).Roles(uast.While, uast.Statement), On(intellij.UntilLoop).Roles(uast.While, uast.Statement), ), )
AnnotationRules describes how a UAST should be annotated with `uast.Role`.
https://godoc.org/gopkg.in/bblfsh/sdk.v1/uast/ann
View Source
var ErrRootMustBeFile = errors.NewKind("root must have internal type FILE")
View Source
var ToNode = &uast.ObjectToNode{ InternalTypeKey: "elementType", OffsetKey: "startOffset", EndOffsetKey: "endOffset", TopLevelIsRootNode: true, TokenKeys: map[string]bool{"text": true}, Modifier: func(n map[string]interface{}) error { if textEndPos, ok := n["textLength"].(float64); ok { n["endOffset"] = textEndPos + n["startOffset"].(float64) delete(n, "textLength") } return nil }, }
ToNode is an instance of `uast.ObjectToNode`, defining how to transform an into a UAST (`uast.Node`).
https://godoc.org/gopkg.in/bblfsh/sdk.v1/uast#ObjectToNode
View Source
var Transformers = []transformer.Tranformer{ annotatter.NewAnnotatter(AnnotationRules), positioner.NewFillLineColFromOffset(), }
Transformers is the of list `transformer.Transfomer` to apply to a UAST, to learn more about the Transformers and the available ones take a look to: https://godoc.org/gopkg.in/bblfsh/sdk.v1/uast/transformers
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package intellij contains the bblfsh predicates we want to look for in ASTs generated by the Intellij BashSupport module, which are based on constants defined in that library.
|
Package intellij contains the bblfsh predicates we want to look for in ASTs generated by the Intellij BashSupport module, which are based on constants defined in that library. |
Click to show internal directories.
Click to hide internal directories.