Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct { Src string `json:"src"` Caller string `json:"caller"` Arguments []string `json:"arguments"` Span core.Span `json:"span"` }
Call NON-PRECISE
func aFunc() { a.b(c, d) } aFunc == Src a.b == caller [c, d] == arguments
func (*Call) GetIndexName ¶
type Clazz ¶
type Clazz struct { Name string `json:"name"` Module string `json:"module"` // this span will include header and content Span core.Span `json:"span"` // which contains language-specific contents Extras interface{} `json:"extras"` // ptr to origin Unit Unit *core.Unit `json:"-"` // language Lang core.LangType `json:"lang"` }
func (*Clazz) GetIndexName ¶
func (*Clazz) GetSignature ¶
func (c *Clazz) GetSignature() ClazzSignature
type ClazzSignature ¶
type ClazzSignature = string
type FuncSignature ¶
type FuncSignature = string
type Function ¶
type Function struct { Name string `json:"name"` Receiver string `json:"receiver"` Parameters []*ValueUnit `json:"parameters"` Returns []*ValueUnit `json:"returns"` // this span will include header and content Span core.Span `json:"span"` // which includes only body BodySpan core.Span `json:"bodySpan"` // which contains language-specific contents Extras interface{} `json:"extras"` // ptr to origin Unit Unit *core.Unit `json:"-"` // language Lang core.LangType `json:"lang"` }
func NewFunction ¶
func NewFunction() *Function
func (*Function) GetIndexName ¶
func (*Function) GetSignature ¶
func (f *Function) GetSignature() FuncSignature
type Symbol ¶
type Symbol struct { Symbol string `json:"symbol"` Kind string `json:"kind"` Span core.Span `json:"span"` FieldName string `json:"fieldName"` // ptr to origin Unit Unit *core.Unit `json:"-"` }
Symbol Units are named identifiers driven by the ASTs
https://github.com/github/semantic/blob/main/docs/examples.md#symbols https://github.com/github/semantic/blob/main/proto/semantic.proto
message Unit { string symbol = 1; string kind = 2; Span span = 4; NodeType node_type = 6; SyntaxType syntax_type = 7; } enum NodeType { ROOT_SCOPE = 0; JUMP_TO_SCOPE = 1; EXPORTED_SCOPE = 2; DEFINITION = 3; REFERENCE = 4; } enum SyntaxType { FUNCTION = 0; METHOD = 1; CLASS = 2; MODULE = 3; CALL = 4; TYPE = 5; INTERFACE = 6; IMPLEMENTATION = 7; }
func (*Symbol) GetIndexName ¶
Click to show internal directories.
Click to hide internal directories.