compile method
Uint8List
compile(
- String content, {
- String? filename,
- CompilerConfig? config,
- bool isModuleEntryScript = false,
- Version? version,
Compile a string into bytecode.
This won't execute the code, so runtime errors will not be reported.
If config is provided, it replaces the initialization compiler config
for this compilation only.
Implementation
Uint8List compile(
String content, {
String? filename,
CompilerConfig? config,
bool isModuleEntryScript = false,
Version? version,
}) {
final source = HTSource(content,
filename: filename,
type: isModuleEntryScript
? HTResourceType.hetuScript
: HTResourceType.hetuModule);
return _compileSource(
source,
version: version,
config: config,
);
}