CodeBuilder

A glorified wrapper around an Appender which supports automatic tabbing and new lines.

On it's own, CodeBuilder may already be more desirable than manually formatting, tabbing new lining, a code string manually.

UFCS can also be used to create functions that can ease the generation of code, such as addFuncCall, addFuncDeclaration, addReturn, etc.

Members

Functions

detab
void detab()

Decreases the tab count.

disable
void disable(UseTabs disableTabs, UseNewLines disableLines)

Disables automatic tabbing and/or new line insertion.

enable
void enable(UseTabs enableTabs, UseNewLines enableLines)

Enables automatic tabbing and/or new line insertion.

entab
void entab()

Increases the tab count, meaning anytime CodeBuilder.put is used an extra tab will be written before the data passed to it.

opOpAssign
void opOpAssign(T data)

overload ~=

put
void put(T data, UseTabs doTabs, UseNewLines doLines)

Inserts data into the code string.

Properties

data
const(dchar)[] data [@property getter]

Meta