Package-level declarations
Types
The P_BootstrapAssignmentStatementCheckMacro primitive is used for checking that an assignment statement's destination variable is within scope. It reduces some false-positive theories from partial parses like "a : b := c", in the likely event that "b" is not a variable that is in scope.
The P_BootstrapAssignmentStatementMacro primitive is used for assignment statements. It constructs an expression-as-statement containing an assignment that has the isInline flag cleared.
The P_BootstrapConstantDeclarationMacro primitive is used for bootstrapping the declaration of a local constant. Constant declarations that occur at the outermost scope are rewritten by the AvailCompiler as a module constant.
Primitive: Construct a method and an accompanying literalizing macro that provide access to the specified special object.
The P_BootstrapInitializingVariableDeclarationMacro primitive is used for bootstrapping declaration of a local variable with an initializing expression.
Primitive: Create a literal phrase from a literal token (already wrapped inside a literal phrase). This is a bootstrap macro, which is initially the only way that literal phrases get built.
The P_BootstrapPrefixBlockArgument primitive is used as a prefix function for bootstrapping argument declarations within a block.
The P_BootstrapPrefixLabelDeclaration primitive is used for bootstrapping declaration of a label. The label indicates a way to restart or exit a block, so it's probably best if Avail's block syntax continues to constrain this to occur at the start of a block.
The P_BootstrapPrefixPostStatement primitive is used for ensuring that statements are top-valued before over-parsing.
The P_BootstrapPrefixVariableDeclaration primitive is used for bootstrapping declaration of a primitive declaration, including an optional primitive failure variable which holds the reason for a primitive's failure.
The P_BootstrapPrefixStartOfBlock primitive is triggered at the start of parsing a block. It pushes the current scope onto the scope stack so that it can be popped again by the P_BootstrapBlockMacro when the block parsing completes.
The P_BootstrapSendAsStatementMacro primitive is used to allow message sends producing ⊤ to be used as statements, by wrapping them inside expression-as-statement.
The P_BootstrapSuperCastMacro primitive is used to create a super-cast phrase. This is used to control method lookup, and is a generalization of the concept of super found in some object-oriented languages.
The P_BootstrapVariableDeclarationMacro primitive is used for bootstrapping declaration of a local variable (without an initializing expression).
The P_BootstrapVariableUseMacro primitive is used to create variable use phrases.
This is the prefix function for P_ModuleHeaderPseudoMacro associated with having just read one more version string in an import clause. Check it against the already parsed version strings for that import to ensure it's not a duplicate. Doing this in a macro prefix function allows early checking (for duplicate import versions), as well as detecting the leftmost error.
This is the prefix function for P_ModuleHeaderPseudoMacro associated with having just read the module name. It allows early checking that the module name agrees with the file name.
This is the prefix function for P_ModuleHeaderPseudoMacro associated with having just read one more module version string. Check it against the already parsed version strings to ensure it's not a duplicate. Doing this in a macro prefix function allows early checking (for duplicate versions).
The P_ModuleHeaderPseudoMacro primitive is used to parse module headers. When this primitive is invoked, it should yield a PhraseKind.STATEMENT_PHRASE. The method is private, and used to parse the headers of modules with the same machinery used for the bodies.