parser

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Text   = symbolType("text")
	For    = symbolType("for")
	Else   = symbolType("else")
	ElseIf = symbolType("elseif")
	End    = symbolType("end")
	If     = symbolType("if")
	Print  = symbolType("print")
	Visit  = symbolType("visit")
	Indent = symbolType("indent")
	EOF    = symbolType("eof")
)

Variables

This section is empty.

Functions

func Parse

func Parse(code, source string, imports func(i string) (string, string, error)) (*ast.AST, error)

Parse a gogen template

func ParseDetailed

func ParseDetailed(code, source string, imports func(i string) (string, string, error)) (*ast.AST, *ggerr.MultiError)

ParseDetailed will always return an error object which contains details about all found errors

Types

type TemplateVisitor

type TemplateVisitor struct {
	*ggt.BaseGoGenTemplateVisitor
	// contains filtered or unexported fields
}

func (*TemplateVisitor) ReportAmbiguity

func (v *TemplateVisitor) ReportAmbiguity(_ antlr.Parser, _ *antlr.DFA, _,
	_ int, _ bool, _ *antlr.BitSet, _ *antlr.ATNConfigSet,
)

func (*TemplateVisitor) ReportAttemptingFullContext

func (v *TemplateVisitor) ReportAttemptingFullContext(_ antlr.Parser, _ *antlr.DFA,
	_, _ int, _ *antlr.BitSet, _ *antlr.ATNConfigSet,
)

func (*TemplateVisitor) ReportContextSensitivity

func (v *TemplateVisitor) ReportContextSensitivity(_ antlr.Parser, _ *antlr.DFA,
	_, _, _ int, _ *antlr.ATNConfigSet,
)

func (*TemplateVisitor) SyntaxError

func (v *TemplateVisitor) SyntaxError(_ antlr.Recognizer, _ interface{},
	line, column int, msg string, _ antlr.RecognitionException,
)

func (*TemplateVisitor) VisitBoolLiteral

func (v *TemplateVisitor) VisitBoolLiteral(ctx *ggt.BoolLiteralContext) interface{}

func (*TemplateVisitor) VisitCall

func (v *TemplateVisitor) VisitCall(ctx *ggt.CallContext) interface{}

func (*TemplateVisitor) VisitDefaultParam

func (v *TemplateVisitor) VisitDefaultParam(ctx *ggt.DefaultParamContext) interface{}

func (*TemplateVisitor) VisitEcho

func (v *TemplateVisitor) VisitEcho(ctx *ggt.EchoContext) interface{}

func (*TemplateVisitor) VisitElseBlock

func (v *TemplateVisitor) VisitElseBlock(ctx *ggt.ElseBlockContext) interface{}

func (*TemplateVisitor) VisitEnd

func (v *TemplateVisitor) VisitEnd(ctx *ggt.EndContext) interface{}

func (*TemplateVisitor) VisitExpression

func (v *TemplateVisitor) VisitExpression(ctx *ggt.ExpressionContext) interface{}

func (*TemplateVisitor) VisitFieldSelector

func (v *TemplateVisitor) VisitFieldSelector(ctx *ggt.FieldSelectorContext) interface{}

func (*TemplateVisitor) VisitFloatLiteral

func (v *TemplateVisitor) VisitFloatLiteral(ctx *ggt.FloatLiteralContext) interface{}

func (*TemplateVisitor) VisitForBlock

func (v *TemplateVisitor) VisitForBlock(ctx *ggt.ForBlockContext) interface{}

func (*TemplateVisitor) VisitIfBlock

func (v *TemplateVisitor) VisitIfBlock(ctx *ggt.IfBlockContext) interface{}

func (*TemplateVisitor) VisitImportParameter

func (v *TemplateVisitor) VisitImportParameter(ctx *ggt.ImportParameterContext) interface{}

func (*TemplateVisitor) VisitImportParameters

func (v *TemplateVisitor) VisitImportParameters(ctx *ggt.ImportParametersContext) interface{}

func (*TemplateVisitor) VisitIndentBlock

func (v *TemplateVisitor) VisitIndentBlock(ctx *ggt.IndentBlockContext) interface{}

func (*TemplateVisitor) VisitIndex

func (v *TemplateVisitor) VisitIndex(ctx *ggt.IndexContext) interface{}

func (*TemplateVisitor) VisitIntLiteral

func (v *TemplateVisitor) VisitIntLiteral(ctx *ggt.IntLiteralContext) interface{}

func (*TemplateVisitor) VisitLiteral

func (v *TemplateVisitor) VisitLiteral(ctx *ggt.LiteralContext) interface{}

func (*TemplateVisitor) VisitOperand

func (v *TemplateVisitor) VisitOperand(ctx *ggt.OperandContext) interface{}

func (*TemplateVisitor) VisitRootExpression

func (v *TemplateVisitor) VisitRootExpression(ctx *ggt.RootExpressionContext) interface{}

func (*TemplateVisitor) VisitRootSelector

func (v *TemplateVisitor) VisitRootSelector(ctx *ggt.RootSelectorContext) interface{}

func (*TemplateVisitor) VisitSelector

func (v *TemplateVisitor) VisitSelector(ctx *ggt.SelectorContext) interface{}

func (*TemplateVisitor) VisitSelectorChain

func (v *TemplateVisitor) VisitSelectorChain(ctx *ggt.SelectorChainContext) interface{}

func (*TemplateVisitor) VisitSlice

func (v *TemplateVisitor) VisitSlice(ctx *ggt.SliceContext) interface{}

func (*TemplateVisitor) VisitStringLiteral

func (v *TemplateVisitor) VisitStringLiteral(ctx *ggt.StringLiteralContext) interface{}

func (*TemplateVisitor) VisitUnaryExpression

func (v *TemplateVisitor) VisitUnaryExpression(ctx *ggt.UnaryExpressionContext) interface{}

func (*TemplateVisitor) VisitVariable

func (v *TemplateVisitor) VisitVariable(ctx *ggt.VariableContext) interface{}

func (*TemplateVisitor) VisitView

func (v *TemplateVisitor) VisitView(ctx *ggt.ViewContext) interface{}

func (*TemplateVisitor) VisitViewParam

func (v *TemplateVisitor) VisitViewParam(ctx *ggt.ViewParamContext) interface{}

func (*TemplateVisitor) VisitVisitDefaultParameters

func (v *TemplateVisitor) VisitVisitDefaultParameters(ctx *ggt.VisitDefaultParametersContext) interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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