-
Returns
self, incorporated intopas itsMainmodule.Declaration
Swift
public func parsedAsMain( into p: inout AST, withBuiltinModuleAccess needsBuiltins: Bool = false, reportingDiagnosticsTo log: inout DiagnosticSet ) throws -> ModuleDecl.IDParameters
needsBuiltinswhether
selfshould be allowed access to builtin functions. -
Returns
selfparsed as theMainmodule.Declaration
Swift
public func parsedAsMain( withBuiltinModuleAccess needsBuiltins: Bool = false, reportingDiagnosticsTo log: inout DiagnosticSet ) throws -> AST.ModuleParameters
needsBuiltinswhether
selfshould be allowed access to builtin functions. -
Returns the IR for
selfas theMainmodule in the context of the hosted standard library.Declaration
Swift
public func loweredToIRAsMainWithHostedStandardLibrary(withBuiltinModuleAccess needsBuiltins: Bool = false) throws -> IR.Module -
Returns
selfas a one-file module and the standard library, typechecked.The module for
selfis the result’slatestModule.Declaration
Swift
public func typecheckedAsMainWithHostedStandardLibrary( reportingDiagnosticsTo log: inout DiagnosticSet, withBuiltinModuleAccess needsBuiltins: Bool = false ) throws -> TypedProgram.Module
View on GitHub