Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Annotations []Mapping
Annotations is a list of individual transformations to annotate a native AST with roles.
var Native = Transformers([][]Transformer{ {Mappings(Annotations...)}, { RolesDedup(), }, }...)
Native is the of list `transformer.Transformer` to apply to a native AST. To learn more about the Transformers and the available ones take a look to: https://godoc.org/github.com/bblfsh/sdk/v3/uast/transformer
var Normalize = Transformers([][]Transformer{ {Mappings(Normalizers...)}, }...)
var Normalizers []Mapping
Normalizers is the main block of normalization rules to convert native AST to semantic UAST.
var Preprocess = Transformers([][]Transformer{ {Mappings(Preprocessors...)}, }...)
var PreprocessCode = []CodeTransformer{ positioner.FromOffset(), }
Code is a special block of transformations that are applied at the end and can access original source code file. It can be used to improve or fix positional information.
https://godoc.org/github.com/bblfsh/sdk/v3/uast/transformer/positioner
var Preprocessors = []Mapping{
ObjectToNode{
InternalTypeKey: "kind",
OffsetKey: "pos",
EndOffsetKey: "end",
LineKey: "line",
ColumnKey: "col",
}.Mapping(),
}
Preprocessors is a block of AST preprocessing rules rules.
var Transforms = driver.Transforms{ Namespace: "typescript", Preprocess: Preprocess, PreprocessCode: PreprocessCode, Normalize: Normalize, Annotations: Native, }
Functions ¶
This section is empty.
Types ¶
This section is empty.