Documentation ¶
Overview ¶
Package printer provides a human-readable printer for the semantic tree nodes.
Index ¶
- type Printer
- func (p Printer) String() string
- func (p *Printer) WriteExpression(n semantic.Expression) *Printer
- func (p *Printer) WriteFunction(f *semantic.Function) *Printer
- func (p *Printer) WriteRune(r rune)
- func (p *Printer) WriteStatement(n semantic.Node) *Printer
- func (p *Printer) WriteString(s string)
- func (p *Printer) WriteType(n semantic.Type) *Printer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer exposes methods for appending string representations of semantic Statements, Expressions and Types. While the strings generated closely match the syntax of the API file, the Printer has been written to aid in debugging, and may not produce parseable output.
func (*Printer) WriteExpression ¶
func (p *Printer) WriteExpression(n semantic.Expression) *Printer
WriteExpression appends the string representation of n to the Printer's buffer.
func (*Printer) WriteFunction ¶
WriteFunction appends the string representation of f to the Printer's buffer.
func (*Printer) WriteStatement ¶
WriteStatement appends the string representation of n to the Printer's buffer.
func (*Printer) WriteString ¶
WriteString appends s to the Printer's buffer.