v2025.6.2
All Bundles

CodeFormatter

Code formatter

Operations

Format

method : public : native : Format(source:String, is_color:Bool) ~ String

Parameters

NameTypeDescription
sourceStringsource code
is_colorBooltrue for ascii color formtting, false otherwise

Return

TypeDescription
Stringformatter code

New

Constructor

New(options:Map<String,String>)

Parameters

NameTypeDescription
optionsMap<String,String>options

Support for following options:

  • "function-space" - (true|false)
  • "ident-space" - (number|0 for tabs)
  • "trim-trailing" - (true|false)
  • "start-line" - (optional|number)
  • "end-line" - (optional|number)