golang

package
v0.16.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindGolangMethodDecl        core.KindRepr = "method_declaration"
	KindGolangFuncDecl          core.KindRepr = "function_declaration"
	KindGolangIdentifier        core.KindRepr = "identifier"
	KindGolangFieldIdentifier   core.KindRepr = "field_identifier"
	KindGolangTypeIdentifier    core.KindRepr = "type_identifier"
	KindGolangParameterList     core.KindRepr = "parameter_list"
	KindGolangParameterDecl     core.KindRepr = "parameter_declaration"
	KindGolangCallExpression    core.KindRepr = "call_expression"
	KindGolangTypeSpec          core.KindRepr = "type_spec"
	KindGolangStructType        core.KindRepr = "struct_type"
	KindGolangFieldDeclList     core.KindRepr = "field_declaration_list"
	KindGolangFieldDecl         core.KindRepr = "field_declaration"
	KindGolangPackageIdentifier core.KindRepr = "package_identifier"
	KindGolangSourceFile        core.KindRepr = "source_file"
	KindGolangBlock             core.KindRepr = "block"
	FieldGolangType             core.KindRepr = "type"
	FieldGolangName             core.KindRepr = "name"
	FieldGolangParameters       core.KindRepr = "parameters"
	FieldGolangFunction         core.KindRepr = "function"
	FieldGolangArguments        core.KindRepr = "arguments"
)

https://github.com/tree-sitter/tree-sitter-go/blob/master/src/node-types.json

Variables

This section is empty.

Functions

This section is empty.

Types

type ClassExtras

type ClassExtras struct {
	Fields []*Field `json:"fields"`
}

type Extractor

type Extractor struct {
}

func (*Extractor) ExtractCalls

func (extractor *Extractor) ExtractCalls(units []*core.Unit) ([]*object.Call, error)

func (*Extractor) ExtractClass

func (extractor *Extractor) ExtractClass(unit *core.Unit) (*object.Clazz, error)

func (*Extractor) ExtractClasses

func (extractor *Extractor) ExtractClasses(units []*core.Unit) ([]*object.Clazz, error)

func (*Extractor) ExtractFunction

func (extractor *Extractor) ExtractFunction(unit *core.Unit) (*object.Function, error)

func (*Extractor) ExtractFunctions

func (extractor *Extractor) ExtractFunctions(units []*core.Unit) ([]*object.Function, error)

func (*Extractor) ExtractSymbols

func (extractor *Extractor) ExtractSymbols(unit []*core.Unit) ([]*object.Symbol, error)

func (*Extractor) GetLang

func (extractor *Extractor) GetLang() core.LangType

func (*Extractor) IsCall

func (extractor *Extractor) IsCall(unit *core.Unit) bool

func (*Extractor) IsClass

func (extractor *Extractor) IsClass(unit *core.Unit) bool

func (*Extractor) IsFunction

func (extractor *Extractor) IsFunction(unit *core.Unit) bool

func (*Extractor) IsSymbol

func (extractor *Extractor) IsSymbol(unit *core.Unit) bool

type Field

type Field struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

type FuncExtras

type FuncExtras struct {
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL