BundledNode
@dynamicMemberLookup
public struct BundledNode<T, P> : Sendable where T : NodeIDProtocol, P : Program
extension BundledNode: Hashable
extension BundledNode: CustomStringConvertible
A projection from a Program of a node along with its extrinsic relationships.
-
The program of which this node is a notional part.
Declaration
Swift
private let container: P -
The node’s identity in
container.ast.Declaration
Swift
public let id: T -
Declaration
Swift
public init(_ id: T, in container: P) -
The site from which self was parsed.
Declaration
Swift
public var site: SourceRange { get } -
The scope in which the node resides.
Requires
selfdoes not identify a module.Declaration
Swift
public var scope: AnyScopeID { get } -
Equality comparison; only check the node ID.
Declaration
Swift
public static func == (lhs: `Self`, rhs: `Self`) -> Bool -
Hashes the value of
idintohasher.Declaration
Swift
public func hash(into hasher: inout Hasher) -
Declaration
Swift
public var description: String { get }
-
Accesses
min the corresponding AST node.Declaration
Swift
public subscript<Target>(dynamicMember m: KeyPath<T.Subject, Target>) -> Target { get } -
Accesses
min the corresponding AST node.Declaration
Swift
public subscript<Target: NodeIDProtocol>( dynamicMember m: KeyPath<T.Subject, Target> ) -> BundledNode<Target, P>
-
The declarations in this immediate scope.
Declaration
Swift
public var decls: DeclIDs { get }
-
The binding declaration containing this variable declaration.
Declaration
Swift
public var binding: BindingDecl.ID { get }
-
The type of the declared entity.
Declaration
Swift
public var type: AnyType { get }
-
The implicit captures for the declared entity.
Declaration
Swift
public var implicitCaptures: [ImplicitCapture] { get }
-
The type of this expression.
Declaration
Swift
public var type: AnyType { get }
-
The declaration referenced by this expression.
Declaration
Swift
public var referredDecl: DeclReference { get }
-
A representation of
selfthat encodes its evaluation order.Declaration
Swift
public var folded: FoldedSequenceExpr { get }
-
The attributes of this function.
Declaration
Swift
public var attributes: FunctionAttributes { get }
View on GitHub