AST

public struct AST : Sendable
extension AST: Codable

An abstract syntax tree.

Node access

Core library

  • Indicates whether the Core library has been loaded.

    Declaration

    Swift

    public var coreModuleIsLoaded: Bool { get }
  • Returns the Hylo type of an optional t.

    Requires

    The Core library must have been loaded.

    Declaration

    Swift

    public func optional(_ t: AnyType) -> UnionType
  • Returns the Hylo type of an array of t.

    Requires

    The Core library must have been loaded.

    Declaration

    Swift

    public func array(_ t: AnyType) -> BoundGenericType
  • Returns the type named name defined in the core library or nil it does not exist.

    Requires

    The Core library must have been loaded.

    Declaration

    Swift

    public func coreType(_ name: String) -> ProductType?
  • Returns the trait named name defined in the core library or nil if it does not exist.

    Requires

    The Core library must have been loaded.

    Declaration

    Swift

    public func coreTrait(_ name: String) -> TraitType?
  • Returns the trait describing types whose instances are expressible by this literal or nil if it does not exist.

    Requires

    The Core library must have been loaded.

    Declaration

    Swift

    public func coreTrait<T>(forTypesExpressibleBy literal: T.Type) -> TraitType? where T : Expr

Helpers

Declarations

Expressions

Patterns

Statements

Others