Expand description
The Java concrete syntax tree. Spec §1.
Java has annotations, type parameters and a package per file. It has no free functions and no header/source split, so the tree has neither.
Structs§
- Annotation
- One annotation use.
- Annotation
Element - One element of an annotation type.
- Annotation
Type @interface Name { ... }- Block
- A block of statements.
- Class
class Name<T> extends B implements I { ... }- Constructor
- A constructor.
- Enum
enum Name { A, B; ... }- Enum
Constant - One enum constant.
- Field
- A field.
- File
- A Java source file, which holds one public type.
- Import
- One
import. - Interface
interface Name { ... }- Method
- A method.
- Param
- One parameter.
- Record
record Name(components) { ... }- Switch
Case - One case of a switch.
- Type
Param - One type parameter.
Enums§
- Annotation
Arg - One argument of an annotation use.
- Expr
- An expression.
- Member
- One member of a type.
- Modifier
- A modifier.
- Primitive
- A Java primitive type.
- Statement
- One statement.
- Type
- A Java type as it will be written.
- Type
Decl - One type declaration.
Functions§
- escape_
keyword - The name a Java keyword collision escapes to.