Documentation ¶
Overview ¶
This package defines source code entities - abstractions that end-user (a programmer) operates on. For convenience these structures have json tags. This is not clean architecture but it's very handy for LSP.
Index ¶
- Variables
- type ArrayBypassConnection
- type Build
- type Component
- type Connection
- type ConnectionReceiver
- type ConnectionReceiverSide
- type ConnectionSenderSide
- type ConnectionSideSelectors
- type Const
- type Directive
- type Entity
- type EntityKind
- type EntityRef
- type File
- type IO
- type Import
- type Interface
- type Location
- type Message
- type Meta
- type Module
- type ModuleManifest
- type ModuleRef
- type Node
- type NormalConnection
- type Package
- type Port
- type PortAddr
- type Position
- type Scope
- type TypeArgs
- type TypeParams
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrModNotFound = errors.New("module not found") ErrPkgNotFound = fmt.Errorf("package not found") ErrImportNotFound = errors.New("import not found") ErrFileNotFound = errors.New("file not found") ErrEntityNotPub = errors.New("entity is not public") )
View Source
var ErrEntityNotFound = errors.New("entity not found")
Functions ¶
This section is empty.
Types ¶
type ArrayBypassConnection ¶ added in v0.6.3
type Connection ¶
type Connection struct { Normal *NormalConnection `json:"normal,omitempty"` ArrayBypass *ArrayBypassConnection `json:"arrayBypass,omitempty"` Meta Meta `json:"meta,omitempty"` }
type ConnectionReceiver ¶
type ConnectionReceiver struct { PortAddr PortAddr `json:"portAddr,omitempty"` Selectors ConnectionSideSelectors `json:"selectors,omitempty"` Meta Meta `json:"meta,omitempty"` }
func (ConnectionReceiver) String ¶
func (r ConnectionReceiver) String() string
type ConnectionReceiverSide ¶
type ConnectionReceiverSide struct { DeferredConnections []Connection `json:"deferredConnections,omitempty"` Receivers []ConnectionReceiver `json:"receivers,omitempty"` }
type ConnectionSenderSide ¶
type ConnectionSenderSide struct { PortAddr *PortAddr `json:"portAddr,omitempty"` Const *Const `json:"literal,omitempty"` Selectors []string `json:"selectors,omitempty"` Meta Meta `json:"meta,omitempty"` }
ConnectionSenderSide unlike ReceiverConnectionSide could refer to constant.
func (ConnectionSenderSide) String ¶
func (s ConnectionSenderSide) String() string
type ConnectionSideSelectors ¶
type ConnectionSideSelectors []string
func (ConnectionSideSelectors) String ¶
func (c ConnectionSideSelectors) String() string
type Entity ¶
type EntityKind ¶
type EntityKind string // It's handy to transmit strings enum instead of digital
const ( ComponentEntity EntityKind = "component_entity" ConstEntity EntityKind = "const_entity" TypeEntity EntityKind = "type_entity" InterfaceEntity EntityKind = "interface_entity" )
type EntityRef ¶
type Interface ¶
type Interface struct { TypeParams TypeParams `json:"typeParams,omitempty"` IO IO `json:"io,omitempty,"` Meta Meta `json:"meta,omitempty"` }
type Message ¶
type Message struct { TypeExpr ts.Expr `json:"typeExpr,omitempty"` Bool *bool `json:"bool,omitempty"` Int *int `json:"int,omitempty"` Float *float64 `json:"float,omitempty"` Str *string `json:"str,omitempty"` List []Const `json:"vec,omitempty"` Map map[string]Const `json:"map,omitempty"` // Used for both maps and structs Meta Meta `json:"meta,omitempty"` }
type Meta ¶
type Meta struct { Text string `json:"text,omitempty"` Start Position `json:"start,omitempty"` Stop Position `json:"stop,omitempty"` }
Meta keeps info about original text related to the structured object
type Module ¶
type Module struct { Manifest ModuleManifest `json:"manifest,omitempty"` Packages map[string]Package `json:"packages,omitempty"` }
type ModuleManifest ¶
type ModuleRef ¶
type Node ¶
type NormalConnection ¶ added in v0.6.3
type NormalConnection struct { SenderSide ConnectionSenderSide `json:"senderSide,omitempty"` ReceiverSide ConnectionReceiverSide `json:"receiverSide,omitempty"` }
type PortAddr ¶
type Scope ¶
func (Scope) WithLocation ¶
type TypeParams ¶
type TypeParams struct { Params []ts.Param `json:"params,omitempty"` Meta Meta `json:"meta,omitempty"` }
func (TypeParams) String ¶
func (t TypeParams) String() string
Click to show internal directories.
Click to hide internal directories.