Expand description
The surface AST the four frontends produce and the checker consumes.
Its JSON form is the JavaScript runtime’s ({ "k": "binary", "op": "add", … }),
so the frontends of both runtimes can be compared node for node.
Structs§
- Constructor
Prototype Definition - A source prototype definition, preserved until the checker refuses it.
- External
Param - A parameter of another item’s function.
- Guard
- The leading
if (n < 0n) throw …of a JavaScript parameter: a negative argument aborts with its message, the guards in their order. - SArray
Item - An element of an array literal, or with
spreadthe elements of an array. - SBinder
- SCase
- One case of a single-level match.
- SComparison
- SCtor
- SData
- SExpr
- A surface expression.
- SField
- SFn
- SImport
- A named import of items of another module of the crate,
import { a, b as c } from './m.mjs'. - SImport
Name - An imported item: its name in its module and the name the import binds.
- SMain
- SModule
- SParam
- SPattern
- A surface pattern.
- SProgram
- A parsed source program.
- SProof
- SProp
- A surface proposition.
- SRecord
Entry - SRow
- One row of a multi-scrutinee surface match.
- SRule
- SSplit
- SSplit
Case - STag
Test - A JavaScript
x.$ === 'tag'(or!==) test: the tested value, the tag and the data type that has it. - STheorem
- Surface
Binding Type Annotation - A present binding annotation, containing either null or an actual type.
- Surface
RawMetadata - One present raw Boolean or null; the containing
Optionrecords absence.
Enums§
- Binary
Op - Surface binary operators:
plusis JavaScript’s overloaded+. - External
- Another item of the module, which a program calls or reads by name without declaring it.
- Flavor
- Conversion semantics: exact, checked (aborts when out of range) or clamped.
- Rounding
- Division rounding a source operator asks for.
- SCase
Pattern - Patterns of a single-level match: one constructor, fields bound to names.
- SEffect
- SItem
- SNode
- SPattern
Node - SProp
Node - SStep
- A proof step:
tnames the tactic family. - Show
Style - How a value is printed: each source language’s own rendering.
- UnaryOp