Documentation
¶
Overview ¶
Package packageextension defines the versioned, data-only boundary used by compiler-integrated packages. Providers receive resolved semantic facts and return ordinary TypeRB source plus a narrow call replacement; they never receive parser, checker, or typed-IR objects.
Index ¶
Constants ¶
View Source
const ProtocolVersion = 1
Variables ¶
This section is empty.
Functions ¶
func RegisterCallProvider ¶
func RegisterCallProvider(name string, provider CallProvider)
Types ¶
type CallProvider ¶
type CallProvider func(SpecializeCallRequest) SpecializeCallResponse
type Definition ¶
type GeneratedSource ¶
type Replacement ¶
type Replacement struct {
Callee string `json:"callee"`
Arguments []ValueSource `json:"arguments"`
}
type RequiredImport ¶
type SpecializeCallRequest ¶
type SpecializeCallResponse ¶
type SpecializeCallResponse struct {
ProtocolVersion int `json:"protocolVersion"`
GeneratedSource *GeneratedSource `json:"generatedSource,omitempty"`
Replacement *Replacement `json:"replacement,omitempty"`
RequiredImports []RequiredImport `json:"requiredImports,omitempty"`
Issues []Issue `json:"issues,omitempty"`
}
func SpecializeCall ¶
func SpecializeCall(request SpecializeCallRequest) (SpecializeCallResponse, error)
Click to show internal directories.
Click to hide internal directories.