Represents source code. Used for maintaining indentation and other source code syntax.
More...
|
StringBuilder | Builder [get] |
| The StringBuilder used internally. More...
|
|
Represents source code. Used for maintaining indentation and other source code syntax.
◆ SourceCodeBuilder()
Hasmer.SourceCodeBuilder.SourceCodeBuilder |
( |
string |
indentationCharacter | ) |
|
|
inline |
Creates a new SourceCodeBuilder object given the indentation character.
- Parameters
-
indentationCharacter | The character (actually a string, not a single character) to use for indentation. This could be a tab or four spaces for example. |
◆ AddIndent()
void Hasmer.SourceCodeBuilder.AddIndent |
( |
int |
amount | ) |
|
|
inline |
Modifies the indentation amount by the given level.
◆ NewLine()
void Hasmer.SourceCodeBuilder.NewLine |
( |
| ) |
|
|
inline |
Appends a new line and puts the proper indentation on that line.
◆ RemoveLastIndent()
void Hasmer.SourceCodeBuilder.RemoveLastIndent |
( |
| ) |
|
|
inline |
Deletes 1 level of indentation from the current line.
◆ Write()
void Hasmer.SourceCodeBuilder.Write |
( |
string |
code | ) |
|
|
inline |
Writes the given string to the stream. Does not append a new line.
◆ Builder
StringBuilder Hasmer.SourceCodeBuilder.Builder |
|
get |
The StringBuilder used internally.
The documentation for this class was generated from the following file:
- libhasmer/Common/SourceCodeBuilder.cs