Documentation
¶
Index ¶
- type Call
- type CallGraph
- type CallKind
- type Declaration
- func (d Declaration) Ambiguous() bool
- func (d Declaration) Constant() bool
- func (d Declaration) End() int
- func (d Declaration) FieldRange(name string) source.Range
- func (d Declaration) FieldText(name string) string
- func (d Declaration) FunctionParameters() []FunctionParameter
- func (d Declaration) HasError() bool
- func (d Declaration) HasField(name string) bool
- func (d Declaration) HasToken(kind token.Kind) bool
- func (d Declaration) Key() NodeKey
- func (d Declaration) NameRange() source.Range
- func (d Declaration) NodeKind() parser.Kind
- func (d Declaration) PointerNode() *parser.Node
- func (d Declaration) PointerNodeIn(model *walk.Model) *parser.Node
- func (d Declaration) Range() source.Range
- func (d Declaration) Start() int
- func (d Declaration) Tags() []string
- func (d Declaration) Valid() bool
- type DuplicateFunction
- type DuplicateGlobal
- type EntryKind
- type EntryPoint
- type ExpansionOrigin
- type Feature
- type Features
- type File
- type FunctionEffects
- type FunctionParameter
- type Include
- type IncludeCycle
- type IncludeEdge
- type IncludeIssue
- type Model
- func (m *Model) AmbiguousIncludes() []IncludeIssue
- func (m *Model) ConflictingIncludeSymbols() []SymbolConflict
- func (m *Model) DefinesName(name string) bool
- func (m *Model) DuplicateFunctions() []DuplicateFunction
- func (m *Model) DuplicateGlobals() []DuplicateGlobal
- func (m *Model) DuplicateIncludes() []IncludeIssue
- func (m *Model) Eval(file *File, node *parser.Node) (int64, bool)
- func (m *Model) ExpansionOrigins(file *File, node *parser.Node) []ExpansionOrigin
- func (m *Model) ExpressionTag(file *File, node *parser.Node) (string, bool)
- func (m *Model) ExpressionTags(file *File, node *parser.Node) []string
- func (m *Model) File(path string) *File
- func (m *Model) FunctionEffects(function Declaration) (FunctionEffects, bool)
- func (m *Model) FunctionVariants(file *File, node *parser.Node) []Declaration
- func (m *Model) InProgram(file *File) bool
- func (m *Model) IncludeCycles() []IncludeCycle
- func (m *Model) Includes() []IncludeIssue
- func (m *Model) MissingIncludes() []IncludeIssue
- func (m *Model) References(declaration Declaration) []Reference
- func (m *Model) ReleaseIncludeTokens(files []*File)
- func (m *Model) Resolve(file *File, node *parser.Node) (Declaration, bool)
- func (m *Model) UnusedIncludes() []IncludeIssue
- type NodeKey
- type Options
- type ParseCache
- type Reference
- type Source
- type SymbolConflict
- type TimingEvent
- type TimingStage
- type Unit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
type Call struct {
Caller Declaration
Callee Declaration
File *File
Node *parser.Node
Kind CallKind
ArgumentOffset int
// contains filtered or unexported fields
}
func (Call) PointerNode ¶
type CallGraph ¶
type CallGraph struct {
Functions []Declaration
Calls []Call
AsyncCalls []Call
EntryPoints []EntryPoint
// contains filtered or unexported fields
}
func (*CallGraph) AsyncIncoming ¶
func (g *CallGraph) AsyncIncoming(function Declaration) []Call
func (*CallGraph) AsyncOutgoing ¶
func (g *CallGraph) AsyncOutgoing(function Declaration) []Call
func (*CallGraph) Outgoing ¶
func (g *CallGraph) Outgoing(function Declaration) []Call
func (*CallGraph) RecursiveComponents ¶
func (g *CallGraph) RecursiveComponents() [][]Declaration
type Declaration ¶
type Declaration struct {
Name string
Kind semantic.SymbolKind
File *File
Node *parser.Node
Symbol *semantic.Symbol
// contains filtered or unexported fields
}
func (Declaration) Ambiguous ¶
func (d Declaration) Ambiguous() bool
func (Declaration) Constant ¶
func (d Declaration) Constant() bool
func (Declaration) End ¶
func (d Declaration) End() int
func (Declaration) FieldRange ¶
func (d Declaration) FieldRange(name string) source.Range
func (Declaration) FieldText ¶
func (d Declaration) FieldText(name string) string
func (Declaration) FunctionParameters ¶
func (d Declaration) FunctionParameters() []FunctionParameter
func (Declaration) HasError ¶
func (d Declaration) HasError() bool
func (Declaration) HasField ¶
func (d Declaration) HasField(name string) bool
func (Declaration) Key ¶
func (d Declaration) Key() NodeKey
func (Declaration) NameRange ¶
func (d Declaration) NameRange() source.Range
func (Declaration) NodeKind ¶
func (d Declaration) NodeKind() parser.Kind
func (Declaration) PointerNode ¶
func (d Declaration) PointerNode() *parser.Node
func (Declaration) PointerNodeIn ¶
func (d Declaration) PointerNodeIn(model *walk.Model) *parser.Node
func (Declaration) Range ¶
func (d Declaration) Range() source.Range
func (Declaration) Start ¶
func (d Declaration) Start() int
func (Declaration) Tags ¶
func (d Declaration) Tags() []string
func (Declaration) Valid ¶
func (d Declaration) Valid() bool
type DuplicateFunction ¶
type DuplicateFunction struct {
Name string
First Declaration
Second Declaration
Owner *File
}
type DuplicateGlobal ¶
type DuplicateGlobal struct {
Name string
First Declaration
Second Declaration
Owner *File
}
type EntryPoint ¶
type EntryPoint struct {
Function Declaration
Kind EntryKind
}
type Features ¶
type Features uint16
func AllFeatures ¶
func AllFeatures() Features
func NewFeatures ¶
func NewFeaturesFromSet ¶
type File ¶
type File struct {
Path string
Source []byte
Parsed *parser.File
CompactParsed *parser.CompactFile
Walk *walk.Model
CompactWalk *walk.CompactModel
Syntax *cst.Model
Semantic *semantic.Model
CompactSemantic *semantic.CompactModel
ExpandedSource []byte
ExpandedParsed *parser.File
ExpandedWalk *walk.Model
ExpandedSemantic *semantic.Model
ExpansionComplete bool
Includes []*Include
Provided bool
// contains filtered or unexported fields
}
func (*File) HasParseErrors ¶
type FunctionEffects ¶
type FunctionEffects struct {
Complete bool
Pure bool
ReadsGlobals []Declaration
WritesGlobals []Declaration
MutatedParameters []int
Calls []Declaration
}
type FunctionParameter ¶
type Include ¶
type IncludeCycle ¶
type IncludeCycle struct {
Owner *File
Edges []IncludeEdge
}
type IncludeEdge ¶
type IncludeIssue ¶
type Model ¶
type Model struct {
Files []*File
Units []*Unit
Declarations map[string][]Declaration
CallGraph *CallGraph
// contains filtered or unexported fields
}
func (*Model) AmbiguousIncludes ¶
func (m *Model) AmbiguousIncludes() []IncludeIssue
func (*Model) ConflictingIncludeSymbols ¶
func (m *Model) ConflictingIncludeSymbols() []SymbolConflict
func (*Model) DefinesName ¶
func (*Model) DuplicateFunctions ¶
func (m *Model) DuplicateFunctions() []DuplicateFunction
func (*Model) DuplicateGlobals ¶
func (m *Model) DuplicateGlobals() []DuplicateGlobal
func (*Model) DuplicateIncludes ¶
func (m *Model) DuplicateIncludes() []IncludeIssue
func (*Model) ExpansionOrigins ¶
func (m *Model) ExpansionOrigins(file *File, node *parser.Node) []ExpansionOrigin
func (*Model) ExpressionTag ¶
func (*Model) ExpressionTags ¶
func (*Model) FunctionEffects ¶
func (m *Model) FunctionEffects(function Declaration) (FunctionEffects, bool)
func (*Model) FunctionVariants ¶
func (m *Model) FunctionVariants(file *File, node *parser.Node) []Declaration
func (*Model) IncludeCycles ¶
func (m *Model) IncludeCycles() []IncludeCycle
func (*Model) Includes ¶
func (m *Model) Includes() []IncludeIssue
func (*Model) MissingIncludes ¶
func (m *Model) MissingIncludes() []IncludeIssue
func (*Model) References ¶
func (m *Model) References(declaration Declaration) []Reference
func (*Model) ReleaseIncludeTokens ¶
func (*Model) UnusedIncludes ¶
func (m *Model) UnusedIncludes() []IncludeIssue
type Options ¶
type Options struct {
WorkingDir string
IncludePaths []string
Defines []string
DefinesComplete bool
ReleaseExpanded bool
ReleaseIncludes bool
Features *Features
ParseCache *ParseCache
ObserveTiming func(TimingEvent)
}
type ParseCache ¶
type ParseCache struct {
// contains filtered or unexported fields
}
func NewParseCache ¶
func NewParseCache() *ParseCache
type Reference ¶
type Reference struct {
File *File
Node *parser.Node
Kind semantic.ReferenceKind
// contains filtered or unexported fields
}
type SymbolConflict ¶
type SymbolConflict struct {
Name string
First Declaration
Second Declaration
Owner *File
}
type TimingEvent ¶
type TimingEvent struct {
Stage TimingStage
Duration time.Duration
}
type TimingStage ¶
type TimingStage string
const ( TimingParse TimingStage = "parse" TimingPreprocess TimingStage = "preprocess" TimingSemantic TimingStage = "semantic" )
Click to show internal directories.
Click to hide internal directories.