NodeKind

public struct NodeKind : Codable, Sendable
extension NodeKind: Hashable
extension NodeKind: Equatable
extension NodeKind: CustomStringConvertible

The type of an AST node; a nominal wrapper for Node.Type that adds conformances and convenience APIs.

  • The underlying value.

    Declaration

    Swift

    public let value: Node.Type
  • Creates an instance with the given underlying value.

    Declaration

    Swift

    public init(_ value: Node.Type)
  • Serializes self into destination.

    Declaration

    Swift

    public func encode(to destination: Encoder) throws
  • Deserializes self from source.

    Declaration

    Swift

    public init(from source: Decoder) throws
  • Incorporates the value of self into h.

    Declaration

    Swift

    public func hash(into h: inout Hasher)
  • Returns true iff l and r denote the same node type.

    Declaration

    Swift

    public static func == (l: `Self`, r: `Self`) -> Bool
  • Returns true iff l and r denote the same node type.

    Declaration

    Swift

    public static func == (l: `Self`, r: Node.Type) -> Bool
  • Returns true iff l and r do not denote the same node type.

    Declaration

    Swift

    public static func != (l: `Self`, r: Node.Type) -> Bool
  • Returns true iff l and r denote the same node type.

    Declaration

    Swift

    public static func == (l: Node.Type, r: `Self`) -> Bool
  • Returns true iff l and r do not denote the same node type.

    Declaration

    Swift

    public static func != (l: Node.Type, r: `Self`) -> Bool
  • Returns true iff me and pattern denote the same node type.

    Declaration

    Swift

    public static func ~= (pattern: Node.Type, me: `Self`) -> Bool
  • The name of the underlying Node type.

    Declaration

    Swift

    public var description: String { get }
  • Undocumented

    Declaration

    Swift

    static let allValues: [Node.Type]
  • Undocumented

    Declaration

    Swift

    static let indices: [NodeKind : Int]