Documentation ¶
Index ¶
- type ErrorListener
- type FormatSettings
- type Formatter
- type FormattingVisitor
- func (v *FormattingVisitor) Visit(tree antlr.ParseTree) interface{}
- func (v *FormattingVisitor) VisitArrayAccess(ctx *parser.ArrayAccessContext) interface{}
- func (v *FormattingVisitor) VisitAssignment(ctx *parser.AssignmentContext) interface{}
- func (v *FormattingVisitor) VisitAssignmentExpression(ctx *parser.AssignmentExpressionContext) interface{}
- func (v *FormattingVisitor) VisitBinaryExpr(ctx *parser.BinaryExprContext) interface{}
- func (v *FormattingVisitor) VisitChildStatements(ctx *parser.ChildStatementsContext) interface{}
- func (v *FormattingVisitor) VisitChildren(tree antlr.RuleNode) interface{}
- func (v *FormattingVisitor) VisitComma(ctx *parser.CommaContext) interface{}
- func (v *FormattingVisitor) VisitErrorNode(_ antlr.ErrorNode) interface{}
- func (v *FormattingVisitor) VisitForStatement(ctx *parser.ForStatementContext) interface{}
- func (v *FormattingVisitor) VisitFunctionDefinition(ctx *parser.FunctionDefinitionContext) interface{}
- func (v *FormattingVisitor) VisitIfElseStatement(ctx *parser.IfElseStatementContext) interface{}
- func (v *FormattingVisitor) VisitIfStatement(ctx *parser.IfStatementContext) interface{}
- func (v *FormattingVisitor) VisitIncludeOrUseFile(ctx *parser.IncludeOrUseFileContext) interface{}
- func (v *FormattingVisitor) VisitInnerInput(ctx *parser.InnerInputContext) interface{}
- func (v *FormattingVisitor) VisitLetStatement(ctx *parser.LetStatementContext) interface{}
- func (v *FormattingVisitor) VisitModuleDefinition(ctx *parser.ModuleDefinitionContext) interface{}
- func (v *FormattingVisitor) VisitSemicolon(ctx *parser.SemicolonContext) interface{}
- func (v *FormattingVisitor) VisitSingleModuleInstantiation(ctx *parser.SingleModuleInstantiationContext) interface{}
- func (v *FormattingVisitor) VisitStart(ctx *parser.StartContext) interface{}
- func (v *FormattingVisitor) VisitTerminal(node antlr.TerminalNode) interface{}
- func (v *FormattingVisitor) VisitTernaryExpr(ctx *parser.TernaryExprContext) interface{}
- func (v *FormattingVisitor) VisitVector(ctx *parser.VectorContext) interface{}
- type TokenFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorListener ¶
type ErrorListener struct { antlr.DefaultErrorListener // contains filtered or unexported fields }
func (*ErrorListener) SyntaxError ¶
func (e *ErrorListener) SyntaxError(_ antlr.Recognizer, _ interface{}, line int, column int, msg string, _ antlr.RecognitionException)
type FormatSettings ¶
type FormatSettings struct {
// contains filtered or unexported fields
}
func DefaultFormatSettings ¶
func DefaultFormatSettings(fileName string) *FormatSettings
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
func NewFormatter ¶
type FormattingVisitor ¶
type FormattingVisitor struct { parser.BaseOpenSCADVisitor // contains filtered or unexported fields }
func NewFormattingVisitor ¶
func NewFormattingVisitor(tokenStream antlr.TokenStream, formatter *TokenFormatter) *FormattingVisitor
func (*FormattingVisitor) Visit ¶
func (v *FormattingVisitor) Visit(tree antlr.ParseTree) interface{}
func (*FormattingVisitor) VisitArrayAccess ¶
func (v *FormattingVisitor) VisitArrayAccess(ctx *parser.ArrayAccessContext) interface{}
func (*FormattingVisitor) VisitAssignment ¶
func (v *FormattingVisitor) VisitAssignment(ctx *parser.AssignmentContext) interface{}
func (*FormattingVisitor) VisitAssignmentExpression ¶
func (v *FormattingVisitor) VisitAssignmentExpression(ctx *parser.AssignmentExpressionContext) interface{}
func (*FormattingVisitor) VisitBinaryExpr ¶
func (v *FormattingVisitor) VisitBinaryExpr(ctx *parser.BinaryExprContext) interface{}
func (*FormattingVisitor) VisitChildStatements ¶
func (v *FormattingVisitor) VisitChildStatements(ctx *parser.ChildStatementsContext) interface{}
func (*FormattingVisitor) VisitChildren ¶
func (v *FormattingVisitor) VisitChildren(tree antlr.RuleNode) interface{}
func (*FormattingVisitor) VisitComma ¶
func (v *FormattingVisitor) VisitComma(ctx *parser.CommaContext) interface{}
func (*FormattingVisitor) VisitErrorNode ¶
func (v *FormattingVisitor) VisitErrorNode(_ antlr.ErrorNode) interface{}
func (*FormattingVisitor) VisitForStatement ¶
func (v *FormattingVisitor) VisitForStatement(ctx *parser.ForStatementContext) interface{}
func (*FormattingVisitor) VisitFunctionDefinition ¶
func (v *FormattingVisitor) VisitFunctionDefinition(ctx *parser.FunctionDefinitionContext) interface{}
func (*FormattingVisitor) VisitIfElseStatement ¶
func (v *FormattingVisitor) VisitIfElseStatement(ctx *parser.IfElseStatementContext) interface{}
func (*FormattingVisitor) VisitIfStatement ¶
func (v *FormattingVisitor) VisitIfStatement(ctx *parser.IfStatementContext) interface{}
func (*FormattingVisitor) VisitIncludeOrUseFile ¶
func (v *FormattingVisitor) VisitIncludeOrUseFile(ctx *parser.IncludeOrUseFileContext) interface{}
func (*FormattingVisitor) VisitInnerInput ¶
func (v *FormattingVisitor) VisitInnerInput(ctx *parser.InnerInputContext) interface{}
func (*FormattingVisitor) VisitLetStatement ¶
func (v *FormattingVisitor) VisitLetStatement(ctx *parser.LetStatementContext) interface{}
func (*FormattingVisitor) VisitModuleDefinition ¶
func (v *FormattingVisitor) VisitModuleDefinition(ctx *parser.ModuleDefinitionContext) interface{}
func (*FormattingVisitor) VisitSemicolon ¶
func (v *FormattingVisitor) VisitSemicolon(ctx *parser.SemicolonContext) interface{}
func (*FormattingVisitor) VisitSingleModuleInstantiation ¶
func (v *FormattingVisitor) VisitSingleModuleInstantiation(ctx *parser.SingleModuleInstantiationContext) interface{}
func (*FormattingVisitor) VisitStart ¶
func (v *FormattingVisitor) VisitStart(ctx *parser.StartContext) interface{}
func (*FormattingVisitor) VisitTerminal ¶
func (v *FormattingVisitor) VisitTerminal(node antlr.TerminalNode) interface{}
func (*FormattingVisitor) VisitTernaryExpr ¶
func (v *FormattingVisitor) VisitTernaryExpr(ctx *parser.TernaryExprContext) interface{}
func (*FormattingVisitor) VisitVector ¶
func (v *FormattingVisitor) VisitVector(ctx *parser.VectorContext) interface{}
type TokenFormatter ¶
type TokenFormatter struct {
// contains filtered or unexported fields
}
func NewTokenFormatter ¶
func NewTokenFormatter(settings *FormatSettings, writer io.Writer) *TokenFormatter
Click to show internal directories.
Click to hide internal directories.