Documentation
¶
Index ¶
- Constants
- type CaseMode
- type GroupToken
- type Measurable
- type Options
- type Output
- type OutputBuilder
- func (o *OutputBuilder) AddTab() Output
- func (o *OutputBuilder) EndScope() Output
- func (o *OutputBuilder) Len() uint64
- func (o *OutputBuilder) LineTokens() uint64
- func (o *OutputBuilder) Lines() uint64
- func (o *OutputBuilder) NewLine() Output
- func (o *OutputBuilder) RemoveTab() Output
- func (o *OutputBuilder) Scopes() uint64
- func (o *OutputBuilder) StartScope(scope Scope) Output
- func (o *OutputBuilder) String() string
- func (o *OutputBuilder) Write(input Token) Output
- func (o *OutputBuilder) WriteAs(input string) Output
- func (o *OutputBuilder) WriteKeyword(word string) Output
- func (o *OutputBuilder) WriteLine(input string) Output
- func (o *OutputBuilder) WriteString(input string) Output
- func (o *OutputBuilder) WriteWhiteSpace() Output
- type OutputSink
- type OutputWriter
- type Scope
- type ScopeWriter
- type StringToken
- type Token
- type TokenWriter
Constants ¶
View Source
const ( SingleQuote = "'" DoubleQuote = "\"" EscapeSingleQuote = "\\'" EscapeDoubleQuote = "\\\"" )
View Source
const ( WhiteSpace = StringToken(" ") NewLine = StringToken("\n") Comma = StringToken(",") Dot = StringToken(".") Range = StringToken("..") Param = StringToken("@") Colon = StringToken(":") QuestionMark = StringToken("?") SBracketOpen = StringToken("[") SBracketClose = StringToken("]") CBracketOpen = StringToken("{") CBracketClose = StringToken("}") RBracketOpen = StringToken("(") RBracketClose = StringToken(")") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GroupToken ¶
type GroupToken struct {
// contains filtered or unexported fields
}
func (*GroupToken) Len ¶
func (g *GroupToken) Len() int
func (*GroupToken) String ¶
func (g *GroupToken) String() string
type Measurable ¶
type Measurable interface {
Len() int
}
type Output ¶
type Output interface { StartScope(scope Scope) Output EndScope() Output Scopes() uint64 Len() uint64 Lines() uint64 AddTab() Output RemoveTab() Output NewLine() Output WriteWhiteSpace() Output WriteString(input string) Output WriteLine(input string) Output WriteKeyword(word string) Output WriteAs(input string) Output Write(input Token) Output String() string }
func NewOutput ¶
func NewOutput(out OutputSink, opts Options) Output
type OutputBuilder ¶
type OutputBuilder struct {
// contains filtered or unexported fields
}
func (*OutputBuilder) AddTab ¶
func (o *OutputBuilder) AddTab() Output
func (*OutputBuilder) EndScope ¶
func (o *OutputBuilder) EndScope() Output
func (*OutputBuilder) Len ¶
func (o *OutputBuilder) Len() uint64
func (*OutputBuilder) LineTokens ¶
func (o *OutputBuilder) LineTokens() uint64
func (*OutputBuilder) Lines ¶
func (o *OutputBuilder) Lines() uint64
func (*OutputBuilder) NewLine ¶
func (o *OutputBuilder) NewLine() Output
func (*OutputBuilder) RemoveTab ¶
func (o *OutputBuilder) RemoveTab() Output
func (*OutputBuilder) Scopes ¶
func (o *OutputBuilder) Scopes() uint64
func (*OutputBuilder) StartScope ¶
func (o *OutputBuilder) StartScope(scope Scope) Output
func (*OutputBuilder) String ¶
func (o *OutputBuilder) String() string
func (*OutputBuilder) Write ¶
func (o *OutputBuilder) Write(input Token) Output
func (*OutputBuilder) WriteAs ¶
func (o *OutputBuilder) WriteAs(input string) Output
func (*OutputBuilder) WriteKeyword ¶
func (o *OutputBuilder) WriteKeyword(word string) Output
func (*OutputBuilder) WriteLine ¶
func (o *OutputBuilder) WriteLine(input string) Output
func (*OutputBuilder) WriteString ¶
func (o *OutputBuilder) WriteString(input string) Output
func (*OutputBuilder) WriteWhiteSpace ¶
func (o *OutputBuilder) WriteWhiteSpace() Output
type OutputSink ¶
type OutputSink interface { io.StringWriter fmt.Stringer }
type OutputWriter ¶
type OutputWriter interface {
WriteTo(output Output)
}
type Scope ¶
type Scope interface { Measurable TokenWriter ScopeWriter Read(output Output) }
type ScopeWriter ¶
type ScopeWriter interface {
WriteScope(scope Scope)
}
type StringToken ¶
type StringToken string
func (StringToken) Len ¶
func (t StringToken) Len() int
func (StringToken) String ¶
func (t StringToken) String() string
type TokenWriter ¶
type TokenWriter interface {
WriteToken(token Token)
}
Click to show internal directories.
Click to hide internal directories.