type

TranspileCmd

abstract class TranspileCmd : FancCmd

Base class for transpiler commands

fields

compiler

Compiler for current pod

outDir
podNames
pods

Pod data with flattened dependency chain

methods

buildScriptMap

Map of pod name to build scripts for environment

compilePod

Compile build script into AST

flattenPods

Expand command line pod names to their full dependency chain.

genPod

Generate pod which calls genType for each non-synthetic

genType

Generate non-synthetic type

init

Standard initializaton

run

Call compilePod on every target

stdCompilerInput

Use the build script to generate the standard compiler input and then inovke the callback on it for additonal configuration.

transpile

Delete outDir and run compilePod on all pods

Slot Details

buildScriptMap

Str:File buildScriptMap()

Map of pod name to build scripts for environment

compilePod

virtual Void compilePod(TranspilePod pod)

Compile build script into AST

compiler

Compiler? compiler

Compiler for current pod

flattenPods

Void flattenPods()

Expand command line pod names to their full dependency chain. We require all podNames to be pre-compiled using normal Fantom compilation

genPod

virtual Void genPod(PodDef pod)

Generate pod which calls genType for each non-synthetic

genType

virtual Void genType(TypeDef type)

Generate non-synthetic type

init

virtual Void init()

Standard initializaton

outDir

@Opt { help="Output directory" }
File outDir := ...

podNames

@Arg { help="Target pod(s)" }
Str[] podNames := Str[,]

pods

TranspilePod[] pods := TranspilePod[,]

Pod data with flattened dependency chain

run

override Int run()

Call compilePod on every target

stdCompilerInput

virtual CompilerInput stdCompilerInput(TranspilePod pod, |CompilerInput|? f := null)

Use the build script to generate the standard compiler input and then inovke the callback on it for additonal configuration.

transpile

virtual Int transpile()

Delete outDir and run compilePod on all pods