Annotation

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationLexerT__0           = 1
	AnnotationLexerT__1           = 2
	AnnotationLexerT__2           = 3
	AnnotationLexerT__3           = 4
	AnnotationLexerStringArg      = 5
	AnnotationLexerFloatArg       = 6
	AnnotationLexerIntArg         = 7
	AnnotationLexerAnnotationName = 8
	AnnotationLexerDot            = 9
	AnnotationLexerFloat          = 10
	AnnotationLexerWHITESPACE     = 11
)

AnnotationLexer tokens.

View Source
const (
	AnnotationParserEOF            = antlr.TokenEOF
	AnnotationParserT__0           = 1
	AnnotationParserT__1           = 2
	AnnotationParserT__2           = 3
	AnnotationParserT__3           = 4
	AnnotationParserStringArg      = 5
	AnnotationParserFloatArg       = 6
	AnnotationParserIntArg         = 7
	AnnotationParserAnnotationName = 8
	AnnotationParserDot            = 9
	AnnotationParserFloat          = 10
	AnnotationParserWHITESPACE     = 11
)

AnnotationParser tokens.

View Source
const (
	AnnotationParserRULE_start          = 0
	AnnotationParserRULE_annotation     = 1
	AnnotationParserRULE_annotationArgs = 2
)

AnnotationParser rules.

Variables

This section is empty.

Functions

func ParseAnnotion

func ParseAnnotion(expr string)

Types

type AnnotationArgsContext

type AnnotationArgsContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewAnnotationArgsContext

func NewAnnotationArgsContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AnnotationArgsContext

func NewEmptyAnnotationArgsContext

func NewEmptyAnnotationArgsContext() *AnnotationArgsContext

func (*AnnotationArgsContext) CopyFrom

func (s *AnnotationArgsContext) CopyFrom(ctx *AnnotationArgsContext)

func (*AnnotationArgsContext) GetParser

func (s *AnnotationArgsContext) GetParser() antlr.Parser

func (*AnnotationArgsContext) GetRuleContext

func (s *AnnotationArgsContext) GetRuleContext() antlr.RuleContext

func (*AnnotationArgsContext) IsAnnotationArgsContext

func (*AnnotationArgsContext) IsAnnotationArgsContext()

func (*AnnotationArgsContext) ToStringTree

func (s *AnnotationArgsContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type AnnotationContext

type AnnotationContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewAnnotationContext

func NewAnnotationContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *AnnotationContext

func NewEmptyAnnotationContext

func NewEmptyAnnotationContext() *AnnotationContext

func (*AnnotationContext) CopyFrom

func (s *AnnotationContext) CopyFrom(ctx *AnnotationContext)

func (*AnnotationContext) GetParser

func (s *AnnotationContext) GetParser() antlr.Parser

func (*AnnotationContext) GetRuleContext

func (s *AnnotationContext) GetRuleContext() antlr.RuleContext

func (*AnnotationContext) IsAnnotationContext

func (*AnnotationContext) IsAnnotationContext()

func (*AnnotationContext) ToStringTree

func (s *AnnotationContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

type AnnotationLexer

type AnnotationLexer struct {
	*antlr.BaseLexer
	// contains filtered or unexported fields
}

func NewAnnotationLexer

func NewAnnotationLexer(input antlr.CharStream) *AnnotationLexer

type AnnotationListener

type AnnotationListener interface {
	antlr.ParseTreeListener

	// EnterStart is called when entering the start production.
	EnterStart(c *StartContext)

	// EnterAnnotationWithArgs is called when entering the AnnotationWithArgs production.
	EnterAnnotationWithArgs(c *AnnotationWithArgsContext)

	// EnterAnnotationWithoutArgs is called when entering the AnnotationWithoutArgs production.
	EnterAnnotationWithoutArgs(c *AnnotationWithoutArgsContext)

	// EnterArgs is called when entering the Args production.
	EnterArgs(c *ArgsContext)

	// ExitStart is called when exiting the start production.
	ExitStart(c *StartContext)

	// ExitAnnotationWithArgs is called when exiting the AnnotationWithArgs production.
	ExitAnnotationWithArgs(c *AnnotationWithArgsContext)

	// ExitAnnotationWithoutArgs is called when exiting the AnnotationWithoutArgs production.
	ExitAnnotationWithoutArgs(c *AnnotationWithoutArgsContext)

	// ExitArgs is called when exiting the Args production.
	ExitArgs(c *ArgsContext)
}

AnnotationListener is a complete listener for a parse tree produced by AnnotationParser.

type AnnotationParser

type AnnotationParser struct {
	*antlr.BaseParser
}

func NewAnnotationParser

func NewAnnotationParser(input antlr.TokenStream) *AnnotationParser

func (*AnnotationParser) Annotation

func (p *AnnotationParser) Annotation() (localctx IAnnotationContext)

func (*AnnotationParser) AnnotationArgs

func (p *AnnotationParser) AnnotationArgs() (localctx IAnnotationArgsContext)

func (*AnnotationParser) Start

func (p *AnnotationParser) Start() (localctx IStartContext)

type AnnotationWithArgsContext

type AnnotationWithArgsContext struct {
	*AnnotationContext
}

func NewAnnotationWithArgsContext

func NewAnnotationWithArgsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AnnotationWithArgsContext

func (*AnnotationWithArgsContext) AnnotationArgs

func (*AnnotationWithArgsContext) AnnotationName

func (s *AnnotationWithArgsContext) AnnotationName() antlr.TerminalNode

func (*AnnotationWithArgsContext) EnterRule

func (s *AnnotationWithArgsContext) EnterRule(listener antlr.ParseTreeListener)

func (*AnnotationWithArgsContext) ExitRule

func (s *AnnotationWithArgsContext) ExitRule(listener antlr.ParseTreeListener)

func (*AnnotationWithArgsContext) GetRuleContext

func (s *AnnotationWithArgsContext) GetRuleContext() antlr.RuleContext

type AnnotationWithoutArgsContext

type AnnotationWithoutArgsContext struct {
	*AnnotationContext
}

func NewAnnotationWithoutArgsContext

func NewAnnotationWithoutArgsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *AnnotationWithoutArgsContext

func (*AnnotationWithoutArgsContext) AnnotationName

func (s *AnnotationWithoutArgsContext) AnnotationName() antlr.TerminalNode

func (*AnnotationWithoutArgsContext) EnterRule

func (s *AnnotationWithoutArgsContext) EnterRule(listener antlr.ParseTreeListener)

func (*AnnotationWithoutArgsContext) ExitRule

func (*AnnotationWithoutArgsContext) GetRuleContext

func (s *AnnotationWithoutArgsContext) GetRuleContext() antlr.RuleContext

type AnnotionListern

type AnnotionListern struct {
	*BaseAnnotationListener
}

type ArgsContext

type ArgsContext struct {
	*AnnotationArgsContext
}

func NewArgsContext

func NewArgsContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ArgsContext

func (*ArgsContext) AllFloatArg

func (s *ArgsContext) AllFloatArg() []antlr.TerminalNode

func (*ArgsContext) AllIntArg

func (s *ArgsContext) AllIntArg() []antlr.TerminalNode

func (*ArgsContext) AllStringArg

func (s *ArgsContext) AllStringArg() []antlr.TerminalNode

func (*ArgsContext) EnterRule

func (s *ArgsContext) EnterRule(listener antlr.ParseTreeListener)

func (*ArgsContext) ExitRule

func (s *ArgsContext) ExitRule(listener antlr.ParseTreeListener)

func (*ArgsContext) FloatArg

func (s *ArgsContext) FloatArg(i int) antlr.TerminalNode

func (*ArgsContext) GetRuleContext

func (s *ArgsContext) GetRuleContext() antlr.RuleContext

func (*ArgsContext) IntArg

func (s *ArgsContext) IntArg(i int) antlr.TerminalNode

func (*ArgsContext) StringArg

func (s *ArgsContext) StringArg(i int) antlr.TerminalNode

type BaseAnnotationListener

type BaseAnnotationListener struct{}

BaseAnnotationListener is a complete listener for a parse tree produced by AnnotationParser.

func (*BaseAnnotationListener) EnterAnnotationWithArgs

func (s *BaseAnnotationListener) EnterAnnotationWithArgs(ctx *AnnotationWithArgsContext)

EnterAnnotationWithArgs is called when production AnnotationWithArgs is entered.

func (*BaseAnnotationListener) EnterAnnotationWithoutArgs

func (s *BaseAnnotationListener) EnterAnnotationWithoutArgs(ctx *AnnotationWithoutArgsContext)

EnterAnnotationWithoutArgs is called when production AnnotationWithoutArgs is entered.

func (*BaseAnnotationListener) EnterArgs

func (s *BaseAnnotationListener) EnterArgs(ctx *ArgsContext)

EnterArgs is called when production Args is entered.

func (*BaseAnnotationListener) EnterEveryRule

func (s *BaseAnnotationListener) EnterEveryRule(ctx antlr.ParserRuleContext)

EnterEveryRule is called when any rule is entered.

func (*BaseAnnotationListener) EnterStart

func (s *BaseAnnotationListener) EnterStart(ctx *StartContext)

EnterStart is called when production start is entered.

func (*BaseAnnotationListener) ExitAnnotationWithArgs

func (s *BaseAnnotationListener) ExitAnnotationWithArgs(ctx *AnnotationWithArgsContext)

ExitAnnotationWithArgs is called when production AnnotationWithArgs is exited.

func (*BaseAnnotationListener) ExitAnnotationWithoutArgs

func (s *BaseAnnotationListener) ExitAnnotationWithoutArgs(ctx *AnnotationWithoutArgsContext)

ExitAnnotationWithoutArgs is called when production AnnotationWithoutArgs is exited.

func (*BaseAnnotationListener) ExitArgs

func (s *BaseAnnotationListener) ExitArgs(ctx *ArgsContext)

ExitArgs is called when production Args is exited.

func (*BaseAnnotationListener) ExitEveryRule

func (s *BaseAnnotationListener) ExitEveryRule(ctx antlr.ParserRuleContext)

ExitEveryRule is called when any rule is exited.

func (*BaseAnnotationListener) ExitStart

func (s *BaseAnnotationListener) ExitStart(ctx *StartContext)

ExitStart is called when production start is exited.

func (*BaseAnnotationListener) VisitErrorNode

func (s *BaseAnnotationListener) VisitErrorNode(node antlr.ErrorNode)

VisitErrorNode is called when an error node is visited.

func (*BaseAnnotationListener) VisitTerminal

func (s *BaseAnnotationListener) VisitTerminal(node antlr.TerminalNode)

VisitTerminal is called when a terminal node is visited.

type Bean

type Bean struct {
	Name string
}

func NewBean

func NewBean() *Bean

type IAnnotation

type IAnnotation interface {
}

type IAnnotationArgsContext

type IAnnotationArgsContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsAnnotationArgsContext differentiates from other interfaces.
	IsAnnotationArgsContext()
}

IAnnotationArgsContext is an interface to support dynamic dispatch.

type IAnnotationContext

type IAnnotationContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsAnnotationContext differentiates from other interfaces.
	IsAnnotationContext()
}

IAnnotationContext is an interface to support dynamic dispatch.

type IStartContext

type IStartContext interface {
	antlr.ParserRuleContext

	// GetParser returns the parser.
	GetParser() antlr.Parser

	// IsStartContext differentiates from other interfaces.
	IsStartContext()
}

IStartContext is an interface to support dynamic dispatch.

type StartContext

type StartContext struct {
	*antlr.BaseParserRuleContext
	// contains filtered or unexported fields
}

func NewEmptyStartContext

func NewEmptyStartContext() *StartContext

func NewStartContext

func NewStartContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *StartContext

func (*StartContext) Annotation

func (s *StartContext) Annotation() IAnnotationContext

func (*StartContext) EOF

func (s *StartContext) EOF() antlr.TerminalNode

func (*StartContext) EnterRule

func (s *StartContext) EnterRule(listener antlr.ParseTreeListener)

func (*StartContext) ExitRule

func (s *StartContext) ExitRule(listener antlr.ParseTreeListener)

func (*StartContext) GetParser

func (s *StartContext) GetParser() antlr.Parser

func (*StartContext) GetRuleContext

func (s *StartContext) GetRuleContext() antlr.RuleContext

func (*StartContext) IsStartContext

func (*StartContext) IsStartContext()

func (*StartContext) ToStringTree

func (s *StartContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string

Jump to

Keyboard shortcuts

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