Expand description
The Cove abstract syntax tree.
The tree mirrors the surface language described by docs/LANGUAGE_CARD.md.
Where the Language Card and ADR 0001 disagree, the Language Card wins.
What each form below means — how it is typed, how it evaluates, and
which errors it can produce — is stated once in
docs/LANGUAGE_REFERENCE.md.
Structs§
- Arg
- One argument at a call site.
- Block
- Enum
Case - Enum
Decl - Expr
- ExprId
- Identifies one expression within the file it was parsed from.
- Field
- FnDecl
- Generic
Param - One type parameter of a declaration, with the traits it is bounded by.
- Impl
Block impl Type { ... }, orimpl Trait for Type { ... }whentrait_nameis present.- Item
- A top-level declaration.
- Match
Arm - Param
- Pattern
- Receiver
- The
selfparameter of a method. - Source
Unit - One
.covefile. Every file in a directory is an implementation unit of the same module. - Stmt
- Struct
Decl - Trait
Decl - A trait: a set of method signatures a type conforms to explicitly.
- Trait
Method - One method signature a trait declares, with an optional default body.
- Type
- A type expression.
- Type
Alias - Use
use console.printlnoruse http.
Enums§
- Binary
Op - Expr
Kind - Item
Kind - Pattern
Kind - Stmt
Kind - StrPart
- A resolved piece of a string literal.
- Type
Kind - UnaryOp