pod compiler

Fantom compiler

Mixins

CDoc

CDoc models the fandoc for a definition node

CFacet

CFacet models a facet definition in a CType or CSlot

CField

CField is a "compiler field" which is represents a Field in the compiler.

CMethod

CMethod is a "compiler method" which is represents a Method in the compiler.

CNode

CNode represents a compile node as base type for CType and CSlot

CParam

CParam models a MethodParam in the compiler.

CPod

CPod is a "compiler pod" used for representing a Pod in the compiler.

CSlot

CSlot is a "compiler slot" which is represents a Slot in the compiler.

CType

CType is a "compiler type" which is class used for representing the Fantom type system in the compiler.

FConst

FConst provides all the fcode constants

Visitor

Vistor is used to walk the abstract syntax tree and visit key nodes.

Classes

ApiDocWriter

ApiDocWriter is used to write out an AST definition in the Fantom API doc formatted used by compilerDoc.

Assemble

Assemble is responsible for assembling the resolved, analyzed, normalized abstract syntax tree into it's fcode representation in memory as a FPod stored on compiler.fpod.

Assembler

Assembler assembles all the TypeDefs into their fcode representation.

AstWriter

AstWriter

AttrAsm

AttrAsm provides support for assembling the attributes table for types and slots.

BinaryExpr

BinaryExpr is used for binary expressions with a left hand side and a right hand side including assignment.

Block

Block is a list of zero or more Stmts

BreakStmt

BreakStmt breaks out of a while/for loop.

CBridge

CBridge is the base class for compiler FFI plugins to expose external type systems to the Fantom compiler as CPods, CTypes, and CSlots.

CDepend

CDepend is a compiler dependency which wraps Depend

CNamespace

CNamespace is responsible for providing a unified view pods, types, and slots between the entities currently being compiled and the entities being imported from pre-compiled pods.

COperators

COperators is used to manage methods annoated with the Operator facet for efficient operator method resolution.

CallExpr

CallExpr is a method call.

CallResolver

CallResolver handles the process of resolving a CallExpr or UnknownVarExpr to a method call or a field access.

Case

Case models a single case block of a SwitchStmt

Catch

Catch models a single catch clause of a TryStmt

CheckErrors

CheckErrors walks the tree of statements and expressions looking for errors the compiler can detect such as invalid type usage.

CheckInheritance

CheckInheritance is used to check invalid extends or mixins.

CheckParamDefs

CheckParamDefs is used to process all the parameter default expressions for all the methods.

ClosureExpr

ClosureExpr is an "inlined anonymous method" which closes over it's lexical scope.

ClosureToImmutable

ClosureToImmutable processes each closure to determine its immutability.

ClosureVars

ClosureVars is used to process closure variables which have been enclosed from their parent scope

CodeAsm

CodeAsm is used to assemble the fcode instructions of an Expr or Block.

CompilationUnit

CompilationUnit models the top level compilation unit of a source file.

CompileJs

CompileJs is used to call the compilerJs plugin to generate javascript for the pod if the @js facet is configured.

Compiler

Compiler manages the top level process of the compiler pipeline.

CompilerInput

CompilerInput encapsulates all the input needed run the compiler.

CompilerLog

CompilerLog manages logging compiler messages.

CompilerOutput

CompilerOutput encapsulates the result of a compile.

CompilerStep

VisitStep represents one discrete task run during the compiler pipeline.

CompilerSupport

CompilerSupport provides lots of convenience methods for classes used during the compiler pipeline.

ComplexLiteral

ComplexLiteral is used to model a serialized complex object declared in facets.

Cond

Cond

CondExpr

CondExpr is used for || and && short-circuit boolean conditionals.

ConstChecks

ConstChecks adds hooks into constructors and it-blocks to ensure that an attempt to set a const field will throw ConstErr if not in the objects constructor.

ConstantFolder

ConstantFolder is used to implement constant folding optimizations where known literals and operations can be performed ahead of time by the compiler.

ContinueStmt

ContinueStmt continues a while/for loop.

DefNode

DefNode is the abstract base class for definition nodes such as TypeDef, MethodDef, and FieldDef.

DefaultCtor

DefaultCtor adds a default public constructor called make() if no constructor was explicitly specified.

DocDef

Type or slot documentation in plain text fandoc format

DslExpr

DslExpr is an embedded Domain Specific Language which is parsed by a DslPlugin.

DslPlugin

DslPlugin is the base class for Domain Specific Language plugins used to compile embedded DSLs.

EnumDef

EnumDef is used to define one ordinal/named enum value in an enum TypeDef.

Expr

Expr

ExprStmt

ExprStmt is a statement with a stand along expression such as an assignment or method call.

FAttr

FAttr is attribute meta-data for a FType or FSlot

FCodePrinter

FCodePrinter prints a human readable syntax for fcode

FFacet

FFacet

FField

FField is the read/write fcode representation of sys::Field.

FFieldRef

FFieldRef

FMethod

FMethod is the read/write fcode representation of sys::Method.

FMethodRef

FMethodRef

FMethodVar

FMethodVar models one parameter or local variable in a FMethod

FPod

FPod is the read/write fcode representation of sys::Pod.

FPodNamespace

FPodNamespace implements Namespace by reading the fcode from pods directly.

FPrinter

FPrinter is used to pretty print fcode

FSlot

FSlot is the read/write fcode representation of sys::Slot.

FTable

FTable is a 16-bit indexed lookup table for pod constants.

FType

FType is the read/write fcode representation of sys::Type.

FTypeRef

FTypeRef stores a typeRef structure used to reference type signatures.

FUtil

FUtil provides fcode encoding and decoding utilities.

FacetDef

FacetDef models a facet declaration.

Fanp

Fantom Disassembler

FieldDef

FieldDef models a field definition

FieldExpr

FieldExpr is used for a field variable access.

ForStmt

ForStmt models a for loop of the format

FuncType

FuncType models a parameterized Func type.

GenerateOutput

GenerateOutput creates the appropriate CompilerOutput instance for Compiler.output based on the configured CompilerInput.output.

GenericParameterType

GenericParameterType models the generic parameter types sys::V, sys::K, etc.

GenericType

GenericType models a parameterized generic type: List, Map, or Func

IfStmt

IfStmt models an if or if/else statement.

IndexedAssignExpr

IndexedAssignExpr is a subclass of ShortcutExpr used in situations like x[y] += z where we need keep of two extra scratch variables and the get's matching set method.

Inherit

Inherit processes each TypeDef to resolve the inherited slots.

InitClosures

During the Parse step we created a list of all the closures.

InitEnum

InitEnum is used to auto-generate EnumDefs into abstract syntax tree representation of the fields and method.

InitFacet

InitFacet is used to auto-generate AST modifications to facet classes.

InitInput

InitInput is responsible

ItExpr

ItExpr models the "it" keyword to access the implicit target of an it-block.

ListLiteralExpr

ListLiteralExpr creates a List instance

ListType

ListType models a parameterized List type.

LiteralExpr

LiteralExpr puts an Bool, Int, Float, Str, Duration, Uri, or null constant onto the stack.

LoadPod

LoadPod is used to immediately load the pod which has just been successfully compiled into Compiler.fpod.

Loc

Loc provides a source file, line number, and column number.

LocalDefStmt

LocalDefStmt models a local variable declaration and its optional initialization expression.

LocalVarExpr

LocalVarExpr is used to access a local variable stored in a register.

LocaleLiteralExpr

LocaleLiteralExpr: podName::key=defVal

LocaleProps

LocaleProps is used to generate or merge locale/en.props if any locale literals specified defaults such as $<foo=Foo>

Loop

Loop

Main

Main is the main entry point for the Fantom compiler.

MapLiteralExpr

MapLiteralExpr creates a List instance

MapType

MapType models a parameterized Map type.

MarkerFacet

Simple implementation for a marker facet

MethodDef

MethodDef models a method definition - it's signature and body.

MethodVar

MethodVar is a variable used in a method - either param or local.

MockField

MockField

MockMethod

MockMethod

MockParam

MockParam

MockSlot

MockSlot are special slots used between the compiler and runtime but not publically exposed by reflection.

NameExpr

NameExpr is the base class for an identifier expression which has an optional base expression.

Node

Node is the base class of all classes which represent a node in the abstract syntax tree generated by the parser.

NopStmt

NopStmt is no operation do nothing statement.

Normalize

Normalize the abstract syntax tree

NullableType

NullableType wraps another CType as nullable with trailing "?".

OrderByInheritance

OrderByInheritance orders the list of TypeDefs from top to bottom such that any inherited types are guaranteed to be positioned first in the types list.

ParamDef

ParamDef models the definition of a method parameter.

ParameterizedField

ParameterizedField

ParameterizedMethod

ParameterizedMethod models a parameterized CMethod

ParameterizedMethodParam

ParameterizedMethodParam

Parse

Parse is responsible for parsing all the compilation units which have already been tokenized into their full abstract syntax tree representation in memory.

Parser

Parser is responsible for parsing a list of tokens into the abstract syntax tree.

PodDef

PodDef models the pod being compiled.

ProtectedRegion

ProtectedRegion

RangeLiteralExpr

RangeLiteralExpr creates a Range instance

ReflectFacet

ReflectFacet

ReflectField

ReflectField

ReflectMethod

ReflectMethod

ReflectNamespace

ReflectNamespace implements Namespace using reflection to compile against the VM's current pod repository.

ReflectParam

ReflectParam

ReflectPod

ReflectPod is the CPod wrapper for a dependent Pod loaded via reflection.

ReflectSlot

ReflectSlot is the implementation of CSlot for a slot imported from a precompiled pod (as opposed to a SlotDef within the compilation units being compiled).

ReflectType

ReflectType is the implementation of CType for a type imported from a precompiled pod (as opposed to a TypeDef within the compilation units being compiled).

RegexDslPlugin

RegexDslPlugin is used to create a Regex instance from a raw string.

ResolveDepends

ResolveDepends resolves each dependency to a CPod and checks the version.

ResolveExpr

Walk the AST to resolve

ResolveImports

ResolveImports maps every Using node in each CompilationUnit to a pod and ensures that it exists and that no imports are duplicated.

ReturnStmt

ReturnStmt returns from the method

ScanForUsingsAndTypes

ScanForUsingsAndTypes is the first phase in a two pass parser.

ShortcutExpr

ShortcutExpr is used for operator expressions which are a shortcut to a method call

SlotDef

SlotDef models a slot definition - a FieldDef or MethodDef

SlotLiteralExpr

SlotLiteralExpr

StaticTargetExpr

StaticTargetExpr wraps a type reference as an Expr for use as a target in a static field access or method call

Stmt

Stmt

StrDslPlugin

StrDslPlugin is used to create a raw Str literal.

SuperExpr

SuperExpr is used to access super class slots.

SwitchStmt

SwitchStmt models a switch and its case and default block

TernaryExpr

TernaryExpr is used for the ternary expression <cond> ? <true> : <false>

ThisExpr

ThisExpr models the "this" keyword to access the implicit this local variable always stored in register zero.

ThrowExpr

ThrowExpr models throw as an expr versus a statement for use inside ternary/elvis operations.

ThrowStmt

ThrowStmt throws an exception

TokenVal

TokenVal stores an instance of a Token at a specific location.

TokenValDsl

Extra information for DSL tokens.

Tokenize

Tokenize is responsible for parsing all the source files into a a list of tokens.

Tokenizer

Tokenizer inputs a Str and output a list of Tokens

TryStmt

TryStmt models a try/catch/finally block

TypeCheckExpr

TypeCheckExpr is an expression which is composed of an arbitrary expression and a type - is, as, coerce

TypeDef

TypeDef models a type definition for a class, mixin or enum

TypeParser

TypeParser is used to parser formal type signatures into CTypes.

TypeRef

TypeRef models a type reference such as an extends clause or a method parameter.

UnaryExpr

UnaryExpr is used for unary expressions including !, +.

UnknownVarExpr

UnknownVarExpr is a place holder in the AST for a variable until we can figure out what it references: local or slot.

Using

Using models an using import statement.

UsingAndTypeScanner

UsingAndTypeScanner

WhileStmt

WhileStmt models a while loop of the format

WritePod

WritePod writes the FPod to a zip file.

Enums

CompilerInputMode

Input source from the file system

CompilerOutputMode

Input source from the file system - see CompilerOutput

ExprId

ExprId uniquely identifies the type of expr

FOp

FOp provides all the fcode constants

FOpArg

FOpArg

ShortcutOp

ShortcutOp is a sub-id for ExprId.shortcut which identifies the an shortuct operation and it's method call

StmtId

StmtId

Token

Token is the enum for all the token types.

VisitDepth

VisitDepth enumerates how deep to traverse the AST

Errs

CompilerErr

CompilerErr - instances should always be created via CompilerStep.err().