DartCompiler class

Compiles a ball Program into formatted Dart source code.

Constructors

DartCompiler(Program program, {bool noFormat = false})

Properties

failedModules Map<String, Object>
Module names that compileAllModules failed to compile on its last run.
final
hashCode int
The hash code for this object.
no setterinherited
noFormat bool
When true, the compiler skips the dart_style formatting step and returns raw (unformatted) Dart source. Use this when the compiled output is known to confuse the formatter (e.g. deeply nested expressions from large inputs) or when formatting is intentionally unwanted.
final
program Program
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compile() String
Compile the program entry module and return formatted Dart source.
compileAllModules() Map<String, String>
Compile every non-base module in the program, returning a map of moduleName → dartSource.
compileModule(String moduleName) String
Compile a single non-entry moduleName to formatted Dart source.
compileModuleRaw(String moduleName) String
Compile a single module to raw (unformatted) Dart source.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

resolveImports(Program program, ModuleResolver resolver) Future<Program>
Pre-resolve all ModuleImport entries in program, returning a self-contained Program with every import inlined as a concrete module. Compilers need full type/function signatures upfront — no lazy loading.