Documentation
¶
Overview ¶
Package analysis wires PawnKit preprocessing, parsing, and semantics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
URI source.URI
Includes preprocess.IncludeResolver
Names sema.Resolver
Predefined map[string]string
Revision string
RetainExpanded bool
MaxOutputTokens int
SkipSemantics bool
TokenCache *preprocess.TokenCache
Previous *Result
// ReuseCompatibleExpansion allows editor diagnostics to reuse an unchanged
// dependency graph. Expanded source may describe the previous local body.
ReuseCompatibleExpansion bool
Trace func(TraceEvent)
}
Options configures one file analysis.
type Result ¶
type Result struct {
File source.FileID
Registry *source.Registry
Preprocess *preprocess.Result
Parse *parser.CompactFile
ExpandedParse *parser.CompactFile
Declarations parser.DeclarationIndex
Symbols *symbol.Table
ExpandedSymbols *symbol.Table
Semantics sema.Result
ControlFlow []sema.FunctionFlow
Diagnostics []diagnostic.Diagnostic
Reuse ReuseStats
// contains filtered or unexported fields
}
Result is one immutable file analysis.
func AnalyzeContext ¶
AnalyzeContext runs the shared per-file pipeline with cancellation.
type ReuseStats ¶ added in v0.1.22
type Stage ¶ added in v0.6.0
type Stage string
Stage identifies one analysis step.
const ( StagePreprocess Stage = "preprocess" StageParseOriginal Stage = "parser.original" StageSymbolsOriginal Stage = "symbols.original" StageParseExpanded Stage = "parser.expanded" StageSymbolsExpanded Stage = "symbols.expanded" StageDeclarations Stage = "declarations" StageSemanticNames Stage = "semantic.names" StageSemanticTags Stage = "semantic.tags" StageSemanticStates Stage = "semantic.states" StageSemanticOrder Stage = "semantic.constants" StageSemanticCFG Stage = "semantic.cfg" )
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cfg builds lightweight control-flow graphs for Pawn functions.
|
Package cfg builds lightweight control-flow graphs for Pawn functions. |
|
Package preprocess implements the Pawn preprocessor: directive parsing, object-like and function-like macro expansion, conditional-compilation branch tracking, and source maps from expanded tokens back to the original source.
|
Package preprocess implements the Pawn preprocessor: directive parsing, object-like and function-like macro expansion, conditional-compilation branch tracking, and source maps from expanded tokens back to the original source. |
|
Package query provides cached analysis over immutable document snapshots.
|
Package query provides cached analysis over immutable document snapshots. |
|
Package sema provides semantic checks over shared symbol tables.
|
Package sema provides semantic checks over shared symbol tables. |
|
Package symbol builds per-file Pawn symbol tables.
|
Package symbol builds per-file Pawn symbol tables. |
Click to show internal directories.
Click to hide internal directories.