Documentation
¶
Overview ¶
line internal/php8/php8.y:2
ragel_subtype=go
Index ¶
- Constants
- type ArgumentList
- type Builder
- func (b *Builder) AppendToSeparatedList(list ast.Vertex, tkn *token.Token, node ast.Vertex) *ParserSeparatedList
- func (b *Builder) NewAnonClass(AttrGroups []ast.Vertex, ClassTkn *token.Token, ArgList ast.Vertex, ...) *ast.StmtClass
- func (b *Builder) NewArgument(Expr ast.Vertex) *ast.Argument
- func (b *Builder) NewArgumentList(OpenParenthesisTkn *token.Token, ArgList ast.Vertex, CommaTkn *token.Token, ...) *ArgumentList
- func (b *Builder) NewAttribute(Name ast.Vertex, ArgList ast.Vertex) *ast.Attribute
- func (b *Builder) NewAttributeGroup(OpenAttributeTkn *token.Token, AttrsList ast.Vertex, ...) *ast.AttributeGroup
- func (b *Builder) NewBracket(OpenParenthesisTkn *token.Token, Expr ast.Vertex, ...) *ast.ExprBrackets
- func (b *Builder) NewCatch(CatchTkn *token.Token, OpenParenthesisTkn *token.Token, ...) *ast.StmtCatch
- func (b *Builder) NewClass(AttrGroups []ast.Vertex, Modifiers []ast.Vertex, ClassTkn *token.Token, ...) *ast.StmtClass
- func (b *Builder) NewClassConstList(AttrGroups []ast.Vertex, Modifiers []ast.Vertex, ConstTkn *token.Token, ...) *ast.StmtClassConstList
- func (b *Builder) NewClassMethod(AttrGroups []ast.Vertex, Modifiers []ast.Vertex, FunctionTkn *token.Token, ...) *ast.StmtClassMethod
- func (b *Builder) NewConstFetch(Name ast.Vertex) *ast.ExprConstFetch
- func (b *Builder) NewEmptySeparatedList() *ParserSeparatedList
- func (b *Builder) NewEnum(AttrGroups []ast.Vertex, EnumTkn *token.Token, Name *token.Token, ...) *ast.StmtEnum
- func (b *Builder) NewEnumCase(AttrGroups []ast.Vertex, CaseTkn *token.Token, Name *token.Token, ...) *ast.EnumCase
- func (b *Builder) NewEnumExpr(AssignTkn *token.Token, Expr ast.Vertex) *EnumCaseExpr
- func (b *Builder) NewEnumType(ColonTkn *token.Token, Type ast.Vertex) *ReturnType
- func (b *Builder) NewExpressionStmt(Expr ast.Vertex, SemiColonTkn *token.Token) ast.Vertex
- func (b *Builder) NewFunction(AttrGroups []ast.Vertex, FunctionTkn *token.Token, AmpersandTkn *token.Token, ...) *ast.StmtFunction
- func (b *Builder) NewGroupUseList(UseTkn *token.Token, Type *token.Token, Prefix ast.Vertex, ...) *ast.StmtGroupUseList
- func (b *Builder) NewIdentifier(IdentifierTkn *token.Token) ast.Vertex
- func (b *Builder) NewInterface(AttrGroups []ast.Vertex, InterfaceTkn *token.Token, Name *token.Token, ...) *ast.StmtInterface
- func (b *Builder) NewIntersectionType(Types ast.Vertex) *ast.Intersection
- func (b *Builder) NewMatch(MatchTkn *token.Token, OpenParenthesisTkn *token.Token, Expr ast.Vertex, ...) *ast.ExprMatch
- func (b *Builder) NewMatchArm(DefaultTkn *token.Token, DefaultCommaTkn *token.Token, Exprs ast.Vertex, ...) *ast.MatchArm
- func (b *Builder) NewMethodCall(Expr ast.Vertex, ObjectOperatorTkn *token.Token, PropertyName ast.Vertex, ...) *ast.ExprMethodCall
- func (b *Builder) NewName(NameTkn *token.Token) *ast.Name
- func (b *Builder) NewNameFullyQualified(NameTkn *token.Token) *ast.NameFullyQualified
- func (b *Builder) NewNamePart(NameTkn *token.Token) *ast.NamePart
- func (b *Builder) NewNameQualified(NameTkn *token.Token) *ast.Name
- func (b *Builder) NewNameRelative(NameTkn *token.Token) *ast.NameRelative
- func (b *Builder) NewNameType(IdentifierTkn *token.Token) *ast.Identifier
- func (b *Builder) NewNamedArgument(Name *token.Token, ColonTkn *token.Token, Expr ast.Vertex) *ast.Argument
- func (b *Builder) NewNamespace(NsTkn *token.Token, Name ast.Vertex, OpenCurlyBracketTkn *token.Token, ...) *ast.StmtNamespace
- func (b *Builder) NewNonEmptySeparatedList(nodes []ast.Vertex, tkns []*token.Token) *ParserSeparatedList
- func (b *Builder) NewNullableType(QuestionTkn *token.Token, Expr ast.Vertex) *ast.Nullable
- func (b *Builder) NewNullsafeMethodCall(Expr ast.Vertex, ObjectOperatorTkn *token.Token, PropertyName ast.Vertex, ...) *ast.ExprNullsafeMethodCall
- func (b *Builder) NewNullsafePropertyFetch(Expr ast.Vertex, ObjectOperatorTkn *token.Token, PropertyName ast.Vertex) *ast.ExprNullsafePropertyFetch
- func (b *Builder) NewNullsafePropertyFetchFromTokens(VariableTkn *token.Token, ObjectOperatorTkn *token.Token, ...) *ast.ExprNullsafePropertyFetch
- func (b *Builder) NewParameter(AttrGroups []ast.Vertex, Modifiers []ast.Vertex, Type ast.Vertex, ...) *ast.Parameter
- func (b *Builder) NewPropertyFetch(Expr ast.Vertex, ObjectOperatorTkn *token.Token, PropertyName ast.Vertex) *ast.ExprPropertyFetch
- func (b *Builder) NewPropertyFetchFromTokens(VariableTkn *token.Token, ObjectOperatorTkn *token.Token, ...) *ast.ExprPropertyFetch
- func (b *Builder) NewPropertyList(AttrGroups []ast.Vertex, Modifiers []ast.Vertex, Type ast.Vertex, ...) *ast.StmtPropertyList
- func (b *Builder) NewReturnType(ColonTkn *token.Token, Type ast.Vertex) *ReturnType
- func (b *Builder) NewScalarMagicConstant(MagicConstantTkn *token.Token) *ast.ScalarMagicConstant
- func (b *Builder) NewSeparatedList(node ast.Vertex) *ParserSeparatedList
- func (b *Builder) NewSeparatedListWithTwoElements(node1 ast.Vertex, tkn *token.Token, node2 ast.Vertex) *ParserSeparatedList
- func (b *Builder) NewThrowExpr(ThrowTkn *token.Token, Expr ast.Vertex) *ast.ExprThrow
- func (b *Builder) NewThrowStmt(ThrowTkn *token.Token, Expr ast.Vertex) *ast.StmtThrow
- func (b *Builder) NewTrait(AttrGroups []ast.Vertex, TraitTkn *token.Token, Name *token.Token, ...) *ast.StmtTrait
- func (b *Builder) NewTry(TryTkn *token.Token, OpenCurlyBracketTkn *token.Token, Stmts []ast.Vertex, ...) *ast.StmtTry
- func (b *Builder) NewUnionType(Types ast.Vertex) *ast.Union
- func (b *Builder) NewUse(Type ast.Vertex, UseName ast.Vertex, AsTkn *token.Token, Alias *token.Token) *ast.StmtUse
- func (b *Builder) NewUseList(UseTkn *token.Token, Type *token.Token, UsesList ast.Vertex, ...) *ast.StmtUseList
- func (b *Builder) NewVariadicArgument(VariadicTkn *token.Token, Expr ast.Vertex) *ast.Argument
- func (b *Builder) SeparatedListItems(list ast.Vertex) (items []ast.Vertex, sepTkns []*token.Token)
- type EnumCaseExpr
- type Lexer
- type Parser
- type ParserBrackets
- type ParserSeparatedList
- type ReturnType
- type TraitAdaptationList
- type TraitMethodRef
Constants ¶
const T_ABSTRACT = 57442
const T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG = 57492
const T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG = 57493
const T_AND_EQUAL = 57467
const T_ARRAY = 57403
const T_ARRAY_CAST = 57453
const T_AS = 57371
const T_ATTRIBUTE = 57486
const T_BAD_CHARACTER = 57358
const T_BOOLEAN_AND = 57474
const T_BOOLEAN_OR = 57473
const T_BOOL_CAST = 57455
const T_BREAK = 57376
const T_CALLABLE = 57404
const T_CASE = 57374
const T_CATCH = 57384
const T_CHARACTER = 57357
const T_CLASS = 57395
const T_CLASS_C = 57405
const T_CLONE = 57435
const T_CLOSE_TAG = 57415
const T_COALESCE = 57457
const T_COALESCE_EQUAL = 57472
const T_COMMENT = 57411
const T_CONCAT_EQUAL = 57465
const T_CONST = 57381
const T_CONSTANT_ENCAPSED_STRING = 57360
const T_CONTINUE = 57377
const T_CURLY_OPEN = 57420
const T_DEC = 57448
const T_DECLARE = 57369
const T_DEFAULT = 57375
const T_DIR = 57424
const T_DIV_EQUAL = 57464
const T_DNUMBER = 57351
const T_DO = 57362
const T_DOC_COMMENT = 57412
const T_DOLLAR_OPEN_CURLY_BRACES = 57419
const T_DOUBLE_ARROW = 57401
const T_DOUBLE_CAST = 57451
const T_ECHO = 57361
const T_ELLIPSIS = 57426
const T_ELSE = 57437
const T_ELSEIF = 57436
const T_EMPTY = 57393
const T_ENCAPSED_AND_WHITESPACE = 57359
const T_ENDDECLARE = 57370
const T_ENDFOR = 57366
const T_ENDFOREACH = 57368
const T_ENDIF = 57438
const T_ENDSWITCH = 57373
const T_ENDWHILE = 57364
const T_END_HEREDOC = 57418
const T_ENUM = 57491
const T_EVAL = 57427
const T_EXIT = 57348
const T_EXTENDS = 57398
const T_FILE = 57410
const T_FINAL = 57443
const T_FINALLY = 57385
const T_FN = 57380
const T_FOR = 57365
const T_FOREACH = 57367
const T_FUNCTION = 57379
const T_FUNC_C = 57408
const T_GLOBAL = 57389
const T_GOTO = 57378
const T_HALT_COMPILER = 57394
const T_IF = 57349
const T_IMPLEMENTS = 57399
const T_INC = 57447
const T_INCLUDE = 57346
const T_INCLUDE_ONCE = 57347
const T_INLINE_HTML = 57356
const T_INSTANCEOF = 57433
const T_INSTEADOF = 57388
const T_INTERFACE = 57397
const T_INT_CAST = 57450
const T_ISSET = 57392
const T_IS_EQUAL = 57480
const T_IS_GREATER_OR_EQUAL = 57483
const T_IS_IDENTICAL = 57478
const T_IS_NOT_EQUAL = 57481
const T_IS_NOT_IDENTICAL = 57479
const T_IS_SMALLER_OR_EQUAL = 57482
const T_LINE = 57409
const T_LIST = 57402
const T_LNUMBER = 57350
const T_LOGICAL_AND = 57432
const T_LOGICAL_OR = 57430
const T_LOGICAL_XOR = 57431
const T_MATCH = 57485
const T_METHOD_C = 57407
const T_MINUS_EQUAL = 57461
const T_MOD_EQUAL = 57466
const T_MUL_EQUAL = 57462
const T_NAMESPACE = 57422
const T_NAME_FULLY_QUALIFIED = 57489
const T_NAME_QUALIFIED = 57488
const T_NAME_RELATIVE = 57487
const T_NEW = 57434
const T_NOELSE = 57459
const T_NS_C = 57423
const T_NS_SEPARATOR = 57425
const T_NULLSAFE_OBJECT_OPERATOR = 57484
const T_NUM_STRING = 57355
const T_OBJECT_CAST = 57454
const T_OBJECT_OPERATOR = 57400
const T_OPEN_TAG = 57413
const T_OPEN_TAG_WITH_ECHO = 57414
const T_OR_EQUAL = 57468
const T_PAAMAYIM_NEKUDOTAYIM = 57421
const T_PLUS_EQUAL = 57460
const T_POW = 57475
const T_POW_EQUAL = 57463
const T_PRINT = 57439
const T_PRIVATE = 57444
const T_PROTECTED = 57445
const T_PUBLIC = 57446
const T_READONLY = 57490
const T_REQUIRE = 57428
const T_REQUIRE_ONCE = 57429
const T_RETURN = 57382
const T_SL = 57476
const T_SL_EQUAL = 57470
const T_SPACESHIP = 57458
const T_SR = 57477
const T_SR_EQUAL = 57471
const T_START_HEREDOC = 57417
const T_STATIC = 57441
const T_STRING = 57352
const T_STRING_CAST = 57452
const T_STRING_VARNAME = 57353
const T_SWITCH = 57372
const T_THROW = 57386
const T_TRAIT = 57396
const T_TRAIT_C = 57406
const T_TRY = 57383
const T_UNSET = 57391
const T_UNSET_CAST = 57456
const T_USE = 57387
const T_VAR = 57390
const T_VARIABLE = 57354
const T_WHILE = 57363
const T_WHITESPACE = 57416
const T_XOR_EQUAL = 57469
const T_YIELD = 57440
const T_YIELD_FROM = 57449
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArgumentList ¶
type ArgumentList struct { Position *position.Position OpenParenthesisTkn *token.Token Arguments []ast.Vertex SeparatorTkns []*token.Token EllipsisTkn *token.Token CloseParenthesisTkn *token.Token }
ArgumentList node
func (*ArgumentList) Accept ¶
func (n *ArgumentList) Accept(v ast.Visitor)
func (*ArgumentList) GetPosition ¶
func (n *ArgumentList) GetPosition() *position.Position
func (*ArgumentList) GetType ¶
func (n *ArgumentList) GetType() ast.Type
type Builder ¶
Builder is responsible for creating nodes inside grammar rules. Creating nodes directly in grammar rules is inconvenient, since there is no autocompletion and you cannot put breakpoints inside.
func NewBuilder ¶
NewBuilder creates a new Builder.
func (*Builder) AppendToSeparatedList ¶
func (b *Builder) AppendToSeparatedList(list ast.Vertex, tkn *token.Token, node ast.Vertex) *ParserSeparatedList
AppendToSeparatedList inserts a new node and/or token into the list.
func (*Builder) NewAnonClass ¶
func (*Builder) NewArgumentList ¶
func (*Builder) NewAttribute ¶
func (*Builder) NewAttributeGroup ¶
func (*Builder) NewBracket ¶
func (*Builder) NewClassConstList ¶
func (*Builder) NewClassMethod ¶
func (b *Builder) NewClassMethod( AttrGroups []ast.Vertex, Modifiers []ast.Vertex, FunctionTkn *token.Token, AmpersandTkn *token.Token, Name *token.Token, OpenParenthesisTkn *token.Token, Params ast.Vertex, CloseParenthesisTkn *token.Token, RetType ast.Vertex, Stmt ast.Vertex, ) *ast.StmtClassMethod
func (*Builder) NewConstFetch ¶
func (b *Builder) NewConstFetch( Name ast.Vertex, ) *ast.ExprConstFetch
func (*Builder) NewEmptySeparatedList ¶
func (b *Builder) NewEmptySeparatedList() *ParserSeparatedList
NewEmptySeparatedList creates a new empty list. Used for places where a delimited list is used.
func (*Builder) NewEnumCase ¶
func (*Builder) NewEnumExpr ¶
func (*Builder) NewEnumType ¶
func (*Builder) NewExpressionStmt ¶
func (*Builder) NewFunction ¶
func (b *Builder) NewFunction( AttrGroups []ast.Vertex, FunctionTkn *token.Token, AmpersandTkn *token.Token, Name *token.Token, OpenParenthesisTkn *token.Token, Params ast.Vertex, CloseParenthesisTkn *token.Token, RetType ast.Vertex, OpenCurlyBracketTkn *token.Token, Stmts []ast.Vertex, CloseCurlyBracketTkn *token.Token, ) *ast.StmtFunction
func (*Builder) NewGroupUseList ¶
func (*Builder) NewIdentifier ¶
func (*Builder) NewInterface ¶
func (*Builder) NewIntersectionType ¶
func (b *Builder) NewIntersectionType( Types ast.Vertex, ) *ast.Intersection
func (*Builder) NewMatchArm ¶
func (*Builder) NewMethodCall ¶
func (*Builder) NewNameFullyQualified ¶
func (b *Builder) NewNameFullyQualified( NameTkn *token.Token, ) *ast.NameFullyQualified
func (*Builder) NewNameQualified ¶
func (*Builder) NewNameRelative ¶
func (b *Builder) NewNameRelative( NameTkn *token.Token, ) *ast.NameRelative
func (*Builder) NewNameType ¶
func (b *Builder) NewNameType( IdentifierTkn *token.Token, ) *ast.Identifier
func (*Builder) NewNamedArgument ¶
func (*Builder) NewNamespace ¶
func (*Builder) NewNonEmptySeparatedList ¶
func (*Builder) NewNullableType ¶
func (*Builder) NewNullsafeMethodCall ¶
func (*Builder) NewNullsafePropertyFetch ¶
func (*Builder) NewNullsafePropertyFetchFromTokens ¶
func (*Builder) NewParameter ¶
func (*Builder) NewPropertyFetch ¶
func (*Builder) NewPropertyFetchFromTokens ¶
func (*Builder) NewPropertyList ¶
func (*Builder) NewReturnType ¶
func (*Builder) NewScalarMagicConstant ¶
func (b *Builder) NewScalarMagicConstant( MagicConstantTkn *token.Token, ) *ast.ScalarMagicConstant
func (*Builder) NewSeparatedList ¶
func (b *Builder) NewSeparatedList(node ast.Vertex) *ParserSeparatedList
NewSeparatedList creates a new single-element list. Used for places where a delimited list is used.
func (*Builder) NewSeparatedListWithTwoElements ¶
func (b *Builder) NewSeparatedListWithTwoElements(node1 ast.Vertex, tkn *token.Token, node2 ast.Vertex) *ParserSeparatedList
NewSeparatedListWithTwoElements creates a new two-element list. Used for places where a delimited list is used.
func (*Builder) NewThrowExpr ¶
func (*Builder) NewThrowStmt ¶
func (*Builder) NewUseList ¶
func (*Builder) NewVariadicArgument ¶
type EnumCaseExpr ¶
func (*EnumCaseExpr) Accept ¶
func (n *EnumCaseExpr) Accept(v ast.Visitor)
func (*EnumCaseExpr) GetPosition ¶
func (n *EnumCaseExpr) GetPosition() *position.Position
func (*EnumCaseExpr) GetType ¶
func (n *EnumCaseExpr) GetType() ast.Type
type Parser ¶
type Parser struct { Lexer *Lexer // contains filtered or unexported fields }
Parser structure
func (*Parser) GetRootNode ¶
GetRootNode returns root node
type ParserBrackets ¶
type ParserBrackets struct { Position *position.Position OpenBracketTkn *token.Token Child ast.Vertex CloseBracketTkn *token.Token }
func (*ParserBrackets) Accept ¶
func (n *ParserBrackets) Accept(v ast.Visitor)
func (*ParserBrackets) GetPosition ¶
func (n *ParserBrackets) GetPosition() *position.Position
func (*ParserBrackets) GetType ¶
func (n *ParserBrackets) GetType() ast.Type
type ParserSeparatedList ¶
type ParserSeparatedList struct { Position *position.Position Items []ast.Vertex SeparatorTkns []*token.Token }
func (*ParserSeparatedList) Accept ¶
func (n *ParserSeparatedList) Accept(v ast.Visitor)
func (*ParserSeparatedList) GetPosition ¶
func (n *ParserSeparatedList) GetPosition() *position.Position
func (*ParserSeparatedList) GetType ¶
func (n *ParserSeparatedList) GetType() ast.Type
type ReturnType ¶
func (*ReturnType) Accept ¶
func (n *ReturnType) Accept(v ast.Visitor)
func (*ReturnType) GetPosition ¶
func (n *ReturnType) GetPosition() *position.Position
func (*ReturnType) GetType ¶
func (n *ReturnType) GetType() ast.Type
type TraitAdaptationList ¶
type TraitAdaptationList struct { Position *position.Position OpenCurlyBracketTkn *token.Token Adaptations []ast.Vertex CloseCurlyBracketTkn *token.Token }
TraitAdaptationList node
func (*TraitAdaptationList) Accept ¶
func (n *TraitAdaptationList) Accept(v ast.Visitor)
func (*TraitAdaptationList) GetPosition ¶
func (n *TraitAdaptationList) GetPosition() *position.Position
func (*TraitAdaptationList) GetType ¶
func (n *TraitAdaptationList) GetType() ast.Type
type TraitMethodRef ¶
type TraitMethodRef struct { Position *position.Position Trait ast.Vertex DoubleColonTkn *token.Token Method ast.Vertex }
TraitMethodRef node
func (*TraitMethodRef) Accept ¶
func (n *TraitMethodRef) Accept(v ast.Visitor)
func (*TraitMethodRef) GetPosition ¶
func (n *TraitMethodRef) GetPosition() *position.Position
func (*TraitMethodRef) GetType ¶
func (n *TraitMethodRef) GetType() ast.Type