formatter

package
v0.0.0-...-b5e8453 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

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

func NewFormatter(fileName string) *Formatter

func (*Formatter) Format

func (f *Formatter) Format() error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL