abstract class compiler::DslPlugin

sys::Obj
  compiler::CompilerSupport
    compiler::DslPlugin

Source

DslPlugin is the base class for Domain Specific Language plugins used to compile embedded DSLs. Subclasses are registered on the anchor type's qname with the "compiler.dsl.{anchor}" indexed prop and must declare a constructor with a Compiler arg.

compile

abstract Expr compile(DslExpr dsl)

Source

Compile DSL source into its Fantom equivalent expression. Log and throw compiler error if there is a problem.

find

static DslPlugin? find(CompilerSupport c, Loc loc, CType anchorType)

Source

Find a DSL plugin for the given anchor type. If there is a problem then log an error and return null.

make

new make(Compiler c)

Source

Constructor with associated compiler.

normalizeSrc

Str normalizeSrc(DslExpr dsl)

Source

Normalize the DSL source using Fantom's multi-line whitespace rules where no non-whitespace chars may be appear to the left of the opening "<|" token. If source is formatted incorrectly then log and throw error.