2020-03-12 22:20:48 +00:00
|
|
|
package ast
|
|
|
|
|
|
|
|
import (
|
2023-12-09 21:36:19 +00:00
|
|
|
"git.maride.cc/maride/php-parser/pkg/position"
|
|
|
|
"git.maride.cc/maride/php-parser/pkg/token"
|
2020-03-12 22:20:48 +00:00
|
|
|
)
|
|
|
|
|
2023-03-25 20:53:52 +00:00
|
|
|
//go:generate go run node_funcs_gen.go
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// Root node
|
|
|
|
type Root struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Stmts []Vertex
|
|
|
|
EndTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
// Nullable node is ?Expr
|
2020-03-12 22:20:48 +00:00
|
|
|
type Nullable struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-20 20:07:58 +00:00
|
|
|
QuestionTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
// Union node is Expr|Expr1|...
|
|
|
|
type Union struct {
|
|
|
|
Position *position.Position
|
|
|
|
Types []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
}
|
|
|
|
|
2022-06-26 00:31:29 +00:00
|
|
|
// Intersection node is Expr&Expr1&...
|
|
|
|
type Intersection struct {
|
|
|
|
Position *position.Position
|
|
|
|
Types []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// Parameter node
|
|
|
|
type Parameter struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2021-07-31 15:00:21 +00:00
|
|
|
Modifiers []Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
Type Vertex
|
2020-12-04 09:36:12 +00:00
|
|
|
AmpersandTkn *token.Token
|
|
|
|
VariadicTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
Var Vertex
|
2020-11-20 20:25:37 +00:00
|
|
|
EqualTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
DefaultValue Vertex
|
|
|
|
}
|
|
|
|
|
|
|
|
// Identifier node
|
|
|
|
type Identifier struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-20 20:02:36 +00:00
|
|
|
IdentifierTkn *token.Token
|
|
|
|
Value []byte
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Argument node
|
|
|
|
type Argument struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
Name Vertex
|
|
|
|
ColonTkn *token.Token
|
2020-11-20 20:57:27 +00:00
|
|
|
VariadicTkn *token.Token
|
|
|
|
AmpersandTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
// Attribute node
|
|
|
|
type Attribute struct {
|
|
|
|
Position *position.Position
|
|
|
|
Name Vertex
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Args []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
}
|
|
|
|
|
|
|
|
// AttributeGroup node
|
|
|
|
type AttributeGroup struct {
|
|
|
|
Position *position.Position
|
|
|
|
OpenAttributeTkn *token.Token
|
|
|
|
Attrs []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseAttributeTkn *token.Token
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// ScalarDnumber node
|
|
|
|
type ScalarDnumber struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-20 21:08:30 +00:00
|
|
|
NumberTkn *token.Token
|
|
|
|
Value []byte
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ScalarEncapsed node
|
|
|
|
type ScalarEncapsed struct {
|
2020-12-11 15:29:22 +00:00
|
|
|
Position *position.Position
|
|
|
|
OpenQuoteTkn *token.Token
|
|
|
|
Parts []Vertex
|
|
|
|
CloseQuoteTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ScalarEncapsedStringPart node
|
|
|
|
type ScalarEncapsedStringPart struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-20 21:36:45 +00:00
|
|
|
EncapsedStrTkn *token.Token
|
|
|
|
Value []byte
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-27 22:38:39 +00:00
|
|
|
// ScalarEncapsedStringVar node
|
|
|
|
type ScalarEncapsedStringVar struct {
|
|
|
|
Position *position.Position
|
|
|
|
DollarOpenCurlyBracketTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Name Vertex
|
2020-12-27 22:38:39 +00:00
|
|
|
OpenSquareBracketTkn *token.Token
|
|
|
|
Dim Vertex
|
|
|
|
CloseSquareBracketTkn *token.Token
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
}
|
|
|
|
|
2020-12-27 22:53:48 +00:00
|
|
|
// ScalarEncapsedStringVar node
|
|
|
|
type ScalarEncapsedStringBrackets struct {
|
|
|
|
Position *position.Position
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Var Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// ScalarHeredoc node
|
|
|
|
type ScalarHeredoc struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-20 21:36:45 +00:00
|
|
|
OpenHeredocTkn *token.Token
|
|
|
|
Parts []Vertex
|
|
|
|
CloseHeredocTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ScalarLnumber node
|
|
|
|
type ScalarLnumber struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-20 21:08:30 +00:00
|
|
|
NumberTkn *token.Token
|
|
|
|
Value []byte
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ScalarMagicConstant node
|
|
|
|
type ScalarMagicConstant struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-20 21:53:58 +00:00
|
|
|
MagicConstTkn *token.Token
|
|
|
|
Value []byte
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ScalarString node
|
|
|
|
type ScalarString struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-20 21:53:58 +00:00
|
|
|
MinusTkn *token.Token
|
|
|
|
StringTkn *token.Token
|
|
|
|
Value []byte
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtBreak node
|
|
|
|
type StmtBreak struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-06 10:02:13 +00:00
|
|
|
BreakTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtCase node
|
|
|
|
type StmtCase struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-06 09:45:08 +00:00
|
|
|
CaseTkn *token.Token
|
|
|
|
Cond Vertex
|
|
|
|
CaseSeparatorTkn *token.Token
|
|
|
|
Stmts []Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtCatch node
|
|
|
|
type StmtCatch struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-14 17:15:50 +00:00
|
|
|
CatchTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Types []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
Var Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-31 16:44:09 +00:00
|
|
|
// StmtEnum node
|
|
|
|
type StmtEnum struct {
|
|
|
|
Position *position.Position
|
|
|
|
AttrGroups []Vertex
|
|
|
|
EnumTkn *token.Token
|
|
|
|
Name Vertex
|
|
|
|
ColonTkn *token.Token
|
|
|
|
Type Vertex
|
|
|
|
ImplementsTkn *token.Token
|
|
|
|
Implements []Vertex
|
|
|
|
ImplementsSeparatorTkns []*token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
}
|
|
|
|
|
|
|
|
// EnumCase node
|
|
|
|
type EnumCase struct {
|
|
|
|
Position *position.Position
|
|
|
|
AttrGroups []Vertex
|
|
|
|
CaseTkn *token.Token
|
|
|
|
Name Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
SemiColonTkn *token.Token
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// StmtClass node
|
|
|
|
type StmtClass struct {
|
2020-12-28 08:10:15 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-12-28 08:10:15 +00:00
|
|
|
Modifiers []Vertex
|
|
|
|
ClassTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Name Vertex
|
2020-12-28 08:10:15 +00:00
|
|
|
OpenParenthesisTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Args []Vertex
|
2020-12-28 08:10:15 +00:00
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ExtendsTkn *token.Token
|
|
|
|
Extends Vertex
|
|
|
|
ImplementsTkn *token.Token
|
|
|
|
Implements []Vertex
|
|
|
|
ImplementsSeparatorTkns []*token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtClassConstList node
|
|
|
|
type StmtClassConstList struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-12-04 12:38:47 +00:00
|
|
|
Modifiers []Vertex
|
|
|
|
ConstTkn *token.Token
|
|
|
|
Consts []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtClassMethod node
|
|
|
|
type StmtClassMethod struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-11-22 12:26:24 +00:00
|
|
|
Modifiers []Vertex
|
|
|
|
FunctionTkn *token.Token
|
|
|
|
AmpersandTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Name Vertex
|
2020-11-22 12:26:24 +00:00
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Params []Vertex
|
2020-12-04 10:22:06 +00:00
|
|
|
SeparatorTkns []*token.Token
|
2020-11-22 12:26:24 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
ReturnType Vertex
|
|
|
|
Stmt Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtConstList node
|
|
|
|
type StmtConstList struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-14 16:25:38 +00:00
|
|
|
ConstTkn *token.Token
|
|
|
|
Consts []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtConstant node
|
|
|
|
type StmtConstant struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-08-24 20:28:44 +00:00
|
|
|
Name Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtContinue node
|
|
|
|
type StmtContinue struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-06 10:02:13 +00:00
|
|
|
ContinueTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtDeclare node
|
|
|
|
type StmtDeclare struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-14 16:25:38 +00:00
|
|
|
DeclareTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Consts []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
Stmt Vertex
|
|
|
|
EndDeclareTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtDefault node
|
|
|
|
type StmtDefault struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-06 09:45:08 +00:00
|
|
|
DefaultTkn *token.Token
|
|
|
|
CaseSeparatorTkn *token.Token
|
|
|
|
Stmts []Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtDo node
|
|
|
|
type StmtDo struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-04 07:53:07 +00:00
|
|
|
DoTkn *token.Token
|
|
|
|
Stmt Vertex
|
|
|
|
WhileTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Cond Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtEcho node
|
|
|
|
type StmtEcho struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-10 20:11:08 +00:00
|
|
|
EchoTkn *token.Token
|
|
|
|
Exprs []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtElse node
|
|
|
|
type StmtElse struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-03 19:18:06 +00:00
|
|
|
ElseTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
Stmt Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtElseIf node
|
|
|
|
type StmtElseIf struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-03 19:18:06 +00:00
|
|
|
ElseIfTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Cond Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
Stmt Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtExpression node
|
|
|
|
type StmtExpression struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-22 16:54:13 +00:00
|
|
|
Expr Vertex
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtFinally node
|
|
|
|
type StmtFinally struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-14 17:15:50 +00:00
|
|
|
FinallyTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtFor node
|
|
|
|
type StmtFor struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-04 08:37:17 +00:00
|
|
|
ForTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Init []Vertex
|
2020-12-04 10:49:13 +00:00
|
|
|
InitSeparatorTkns []*token.Token
|
2020-09-04 08:37:17 +00:00
|
|
|
InitSemiColonTkn *token.Token
|
|
|
|
Cond []Vertex
|
2020-12-04 10:49:13 +00:00
|
|
|
CondSeparatorTkns []*token.Token
|
2020-09-04 08:37:17 +00:00
|
|
|
CondSemiColonTkn *token.Token
|
|
|
|
Loop []Vertex
|
2020-12-04 10:49:13 +00:00
|
|
|
LoopSeparatorTkns []*token.Token
|
2020-09-04 08:37:17 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
Stmt Vertex
|
|
|
|
EndForTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtForeach node
|
|
|
|
type StmtForeach struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-14 15:36:55 +00:00
|
|
|
ForeachTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
AsTkn *token.Token
|
|
|
|
Key Vertex
|
|
|
|
DoubleArrowTkn *token.Token
|
2020-12-26 17:38:45 +00:00
|
|
|
AmpersandTkn *token.Token
|
2020-09-14 15:36:55 +00:00
|
|
|
Var Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
Stmt Vertex
|
|
|
|
EndForeachTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtFunction node
|
|
|
|
type StmtFunction struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-11-22 12:26:24 +00:00
|
|
|
FunctionTkn *token.Token
|
|
|
|
AmpersandTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Name Vertex
|
2020-11-22 12:26:24 +00:00
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Params []Vertex
|
2020-12-04 10:22:06 +00:00
|
|
|
SeparatorTkns []*token.Token
|
2020-11-22 12:26:24 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
ReturnType Vertex
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtGlobal node
|
|
|
|
type StmtGlobal struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-09 19:53:51 +00:00
|
|
|
GlobalTkn *token.Token
|
|
|
|
Vars []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtGoto node
|
|
|
|
type StmtGoto struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-17 13:49:54 +00:00
|
|
|
GotoTkn *token.Token
|
|
|
|
Label Vertex
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtHaltCompiler node
|
|
|
|
type StmtHaltCompiler struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-08-24 18:41:06 +00:00
|
|
|
HaltCompilerTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtIf node
|
|
|
|
type StmtIf struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-03 19:18:06 +00:00
|
|
|
IfTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Cond Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
Stmt Vertex
|
|
|
|
ElseIf []Vertex
|
|
|
|
Else Vertex
|
|
|
|
EndIfTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtInlineHtml node
|
|
|
|
type StmtInlineHtml struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-14 13:36:01 +00:00
|
|
|
InlineHtmlTkn *token.Token
|
|
|
|
Value []byte
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtInterface node
|
|
|
|
type StmtInterface struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-11-22 16:54:13 +00:00
|
|
|
InterfaceTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Name Vertex
|
2020-12-28 08:10:15 +00:00
|
|
|
ExtendsTkn *token.Token
|
|
|
|
Extends []Vertex
|
|
|
|
ExtendsSeparatorTkns []*token.Token
|
2020-11-22 16:54:13 +00:00
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtLabel node
|
|
|
|
type StmtLabel struct {
|
2020-12-28 21:01:02 +00:00
|
|
|
Position *position.Position
|
|
|
|
Name Vertex
|
|
|
|
ColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtNamespace node
|
|
|
|
type StmtNamespace struct {
|
2020-12-11 15:29:22 +00:00
|
|
|
Position *position.Position
|
|
|
|
NsTkn *token.Token
|
|
|
|
Name Vertex
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtNop node
|
|
|
|
type StmtNop struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-14 16:34:02 +00:00
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtProperty node
|
|
|
|
type StmtProperty struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-22 16:54:13 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtPropertyList node
|
|
|
|
type StmtPropertyList struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-11-29 19:50:33 +00:00
|
|
|
Modifiers []Vertex
|
|
|
|
Type Vertex
|
2020-12-28 21:01:02 +00:00
|
|
|
Props []Vertex
|
2020-11-29 19:50:33 +00:00
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtReturn node
|
|
|
|
type StmtReturn struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-06 10:09:00 +00:00
|
|
|
ReturnTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtStatic node
|
|
|
|
type StmtStatic struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-09 19:53:51 +00:00
|
|
|
StaticTkn *token.Token
|
|
|
|
Vars []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtStaticVar node
|
|
|
|
type StmtStaticVar struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-09 19:53:51 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtStmtList node
|
|
|
|
type StmtStmtList struct {
|
2020-12-11 15:29:22 +00:00
|
|
|
Position *position.Position
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtSwitch node
|
|
|
|
type StmtSwitch struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-06 09:45:08 +00:00
|
|
|
SwitchTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Cond Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
CaseSeparatorTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Cases []Vertex
|
2020-09-06 09:45:08 +00:00
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
EndSwitchTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtThrow node
|
|
|
|
type StmtThrow struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-17 13:37:34 +00:00
|
|
|
ThrowTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtTrait node
|
|
|
|
type StmtTrait struct {
|
2020-12-11 15:29:22 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-12-11 15:29:22 +00:00
|
|
|
TraitTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Name Vertex
|
2020-12-11 15:29:22 +00:00
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtTraitUse node
|
|
|
|
type StmtTraitUse struct {
|
2020-12-20 21:04:23 +00:00
|
|
|
Position *position.Position
|
|
|
|
UseTkn *token.Token
|
|
|
|
Traits []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Adaptations []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtTraitUseAlias node
|
|
|
|
type StmtTraitUseAlias struct {
|
2020-12-28 08:47:09 +00:00
|
|
|
Position *position.Position
|
|
|
|
Trait Vertex
|
|
|
|
DoubleColonTkn *token.Token
|
|
|
|
Method Vertex
|
|
|
|
AsTkn *token.Token
|
|
|
|
Modifier Vertex
|
|
|
|
Alias Vertex
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtTraitUsePrecedence node
|
|
|
|
type StmtTraitUsePrecedence struct {
|
2020-12-28 08:47:09 +00:00
|
|
|
Position *position.Position
|
|
|
|
Trait Vertex
|
|
|
|
DoubleColonTkn *token.Token
|
|
|
|
Method Vertex
|
|
|
|
InsteadofTkn *token.Token
|
|
|
|
Insteadof []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtTry node
|
|
|
|
type StmtTry struct {
|
2020-12-11 15:29:22 +00:00
|
|
|
Position *position.Position
|
|
|
|
TryTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
Catches []Vertex
|
|
|
|
Finally Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// StmtUnset node
|
|
|
|
type StmtUnset struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-14 14:19:17 +00:00
|
|
|
UnsetTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Vars []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
// StmtUseList node
|
|
|
|
type StmtUseList struct {
|
|
|
|
Position *position.Position
|
|
|
|
UseTkn *token.Token
|
|
|
|
Type Vertex
|
|
|
|
Uses []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
// StmtGroupUseList node
|
|
|
|
type StmtGroupUseList struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-08-22 13:59:26 +00:00
|
|
|
UseTkn *token.Token
|
|
|
|
Type Vertex
|
|
|
|
LeadingNsSeparatorTkn *token.Token
|
|
|
|
Prefix Vertex
|
|
|
|
NsSeparatorTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Uses []Vertex
|
2020-12-04 12:38:47 +00:00
|
|
|
SeparatorTkns []*token.Token
|
2020-08-22 13:59:26 +00:00
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
// StmtUse node
|
|
|
|
type StmtUse struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-08-22 13:59:26 +00:00
|
|
|
Type Vertex
|
|
|
|
NsSeparatorTkn *token.Token
|
|
|
|
Use Vertex
|
|
|
|
AsTkn *token.Token
|
|
|
|
Alias Vertex
|
2020-08-03 19:22:53 +00:00
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// StmtWhile node
|
|
|
|
type StmtWhile struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-09-04 07:33:47 +00:00
|
|
|
WhileTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Cond Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
Stmt Vertex
|
|
|
|
EndWhileTkn *token.Token
|
|
|
|
SemiColonTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprArray node
|
|
|
|
type ExprArray struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-30 21:42:56 +00:00
|
|
|
ArrayTkn *token.Token
|
|
|
|
OpenBracketTkn *token.Token
|
|
|
|
Items []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprArrayDimFetch node
|
|
|
|
type ExprArrayDimFetch struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-03 22:13:28 +00:00
|
|
|
Var Vertex
|
|
|
|
OpenBracketTkn *token.Token
|
|
|
|
Dim Vertex
|
|
|
|
CloseBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprArrayItem node
|
|
|
|
type ExprArrayItem struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-30 22:42:45 +00:00
|
|
|
EllipsisTkn *token.Token
|
|
|
|
Key Vertex
|
|
|
|
DoubleArrowTkn *token.Token
|
2020-12-26 18:13:50 +00:00
|
|
|
AmpersandTkn *token.Token
|
2020-11-30 22:42:45 +00:00
|
|
|
Val Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprArrowFunction node
|
|
|
|
type ExprArrowFunction struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-11-22 12:26:24 +00:00
|
|
|
StaticTkn *token.Token
|
|
|
|
FnTkn *token.Token
|
|
|
|
AmpersandTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Params []Vertex
|
2020-12-04 10:22:06 +00:00
|
|
|
SeparatorTkns []*token.Token
|
2020-11-22 12:26:24 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
ReturnType Vertex
|
|
|
|
DoubleArrowTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBitwiseNot node
|
|
|
|
type ExprBitwiseNot struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 07:51:47 +00:00
|
|
|
TildaTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBooleanNot node
|
|
|
|
type ExprBooleanNot struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 07:51:47 +00:00
|
|
|
ExclamationTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-27 22:02:14 +00:00
|
|
|
type ExprBrackets struct {
|
|
|
|
Position *position.Position
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// ExprClassConstFetch node
|
|
|
|
type ExprClassConstFetch struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 07:51:47 +00:00
|
|
|
Class Vertex
|
|
|
|
DoubleColonTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Const Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprClone node
|
|
|
|
type ExprClone struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 07:51:47 +00:00
|
|
|
CloneTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprClosure node
|
|
|
|
type ExprClosure struct {
|
2020-12-26 16:20:10 +00:00
|
|
|
Position *position.Position
|
2021-07-30 17:53:27 +00:00
|
|
|
AttrGroups []Vertex
|
2020-12-26 16:20:10 +00:00
|
|
|
StaticTkn *token.Token
|
|
|
|
FunctionTkn *token.Token
|
|
|
|
AmpersandTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Params []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
UseTkn *token.Token
|
|
|
|
UseOpenParenthesisTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Uses []Vertex
|
2020-12-26 16:20:10 +00:00
|
|
|
UseSeparatorTkns []*token.Token
|
|
|
|
UseCloseParenthesisTkn *token.Token
|
|
|
|
ColonTkn *token.Token
|
|
|
|
ReturnType Vertex
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Stmts []Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprClosureUse node
|
|
|
|
type ExprClosureUse struct {
|
2020-12-26 16:20:10 +00:00
|
|
|
Position *position.Position
|
|
|
|
AmpersandTkn *token.Token
|
|
|
|
Var Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprConstFetch node
|
|
|
|
type ExprConstFetch struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Const Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprEmpty node
|
|
|
|
type ExprEmpty struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 09:12:56 +00:00
|
|
|
EmptyTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprErrorSuppress node
|
|
|
|
type ExprErrorSuppress struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
AtTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprEval node
|
|
|
|
type ExprEval struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 09:58:09 +00:00
|
|
|
EvalTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprExit node
|
|
|
|
type ExprExit struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-26 20:41:25 +00:00
|
|
|
ExitTkn *token.Token
|
2020-12-01 09:58:09 +00:00
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprFunctionCall node
|
|
|
|
type ExprFunctionCall struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 09:58:09 +00:00
|
|
|
Function Vertex
|
|
|
|
OpenParenthesisTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Args []Vertex
|
2020-12-04 09:36:12 +00:00
|
|
|
SeparatorTkns []*token.Token
|
2021-07-31 20:50:59 +00:00
|
|
|
EllipsisTkn *token.Token
|
2020-12-01 09:58:09 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprInclude node
|
|
|
|
type ExprInclude struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 09:58:09 +00:00
|
|
|
IncludeTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprIncludeOnce node
|
|
|
|
type ExprIncludeOnce struct {
|
2020-12-26 20:44:14 +00:00
|
|
|
Position *position.Position
|
|
|
|
IncludeOnceTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprInstanceOf node
|
|
|
|
type ExprInstanceOf struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 10:16:46 +00:00
|
|
|
Expr Vertex
|
|
|
|
InstanceOfTkn *token.Token
|
|
|
|
Class Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprIsset node
|
|
|
|
type ExprIsset struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-01 10:16:46 +00:00
|
|
|
IssetTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Vars []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseParenthesisTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprList node
|
|
|
|
type ExprList struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-11-30 21:42:56 +00:00
|
|
|
ListTkn *token.Token
|
|
|
|
OpenBracketTkn *token.Token
|
|
|
|
Items []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprMethodCall node
|
|
|
|
type ExprMethodCall struct {
|
2020-12-27 21:04:09 +00:00
|
|
|
Position *position.Position
|
|
|
|
Var Vertex
|
|
|
|
ObjectOperatorTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Method Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Args []Vertex
|
2020-12-27 21:04:09 +00:00
|
|
|
SeparatorTkns []*token.Token
|
2021-07-31 20:50:59 +00:00
|
|
|
EllipsisTkn *token.Token
|
2020-12-27 21:04:09 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
// ExprNullsafeMethodCall node is $a?->methodName()
|
|
|
|
type ExprNullsafeMethodCall struct {
|
|
|
|
Position *position.Position
|
|
|
|
Var Vertex
|
|
|
|
ObjectOperatorTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Method Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Args []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
2021-07-31 20:50:59 +00:00
|
|
|
EllipsisTkn *token.Token
|
2021-07-30 17:53:27 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// ExprNew node
|
|
|
|
type ExprNew struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-03 20:04:59 +00:00
|
|
|
NewTkn *token.Token
|
|
|
|
Class Vertex
|
|
|
|
OpenParenthesisTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Args []Vertex
|
2020-12-04 09:36:12 +00:00
|
|
|
SeparatorTkns []*token.Token
|
2020-12-03 20:04:59 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprPostDec node
|
|
|
|
type ExprPostDec struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Var Vertex
|
|
|
|
DecTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprPostInc node
|
|
|
|
type ExprPostInc struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Var Vertex
|
|
|
|
IncTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprPreDec node
|
|
|
|
type ExprPreDec struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
DecTkn *token.Token
|
|
|
|
Var Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprPreInc node
|
|
|
|
type ExprPreInc struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
IncTkn *token.Token
|
|
|
|
Var Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprPrint node
|
|
|
|
type ExprPrint struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-03 20:20:50 +00:00
|
|
|
PrintTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprPropertyFetch node
|
|
|
|
type ExprPropertyFetch struct {
|
2020-12-27 21:04:09 +00:00
|
|
|
Position *position.Position
|
|
|
|
Var Vertex
|
|
|
|
ObjectOperatorTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Prop Vertex
|
2020-12-27 21:04:09 +00:00
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
// ExprNullsafePropertyFetch node
|
|
|
|
type ExprNullsafePropertyFetch struct {
|
|
|
|
Position *position.Position
|
|
|
|
Var Vertex
|
|
|
|
ObjectOperatorTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Prop Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
// ExprRequire node
|
|
|
|
type ExprRequire struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-03 20:20:50 +00:00
|
|
|
RequireTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprRequireOnce node
|
|
|
|
type ExprRequireOnce struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-03 20:20:50 +00:00
|
|
|
RequireOnceTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprShellExec node
|
|
|
|
type ExprShellExec struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-03 20:41:08 +00:00
|
|
|
OpenBacktickTkn *token.Token
|
|
|
|
Parts []Vertex
|
|
|
|
CloseBacktickTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprStaticCall node
|
|
|
|
type ExprStaticCall struct {
|
2020-12-27 21:19:49 +00:00
|
|
|
Position *position.Position
|
|
|
|
Class Vertex
|
|
|
|
DoubleColonTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Call Vertex
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Args []Vertex
|
2020-12-27 21:19:49 +00:00
|
|
|
SeparatorTkns []*token.Token
|
2021-07-31 20:50:59 +00:00
|
|
|
EllipsisTkn *token.Token
|
2020-12-27 21:19:49 +00:00
|
|
|
CloseParenthesisTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprStaticPropertyFetch node
|
|
|
|
type ExprStaticPropertyFetch struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-03 20:41:08 +00:00
|
|
|
Class Vertex
|
|
|
|
DoubleColonTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Prop Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprTernary node
|
|
|
|
type ExprTernary struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-28 21:01:02 +00:00
|
|
|
Cond Vertex
|
2020-12-03 20:41:08 +00:00
|
|
|
QuestionTkn *token.Token
|
|
|
|
IfTrue Vertex
|
|
|
|
ColonTkn *token.Token
|
|
|
|
IfFalse Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprUnaryMinus node
|
|
|
|
type ExprUnaryMinus struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-03 22:13:28 +00:00
|
|
|
MinusTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprUnaryPlus node
|
|
|
|
type ExprUnaryPlus struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
PlusTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprVariable node
|
|
|
|
type ExprVariable struct {
|
2020-12-27 19:55:36 +00:00
|
|
|
Position *position.Position
|
|
|
|
DollarTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Name Vertex
|
2020-12-27 19:55:36 +00:00
|
|
|
CloseCurlyBracketTkn *token.Token
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprYield node
|
|
|
|
type ExprYield struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 07:42:45 +00:00
|
|
|
YieldTkn *token.Token
|
|
|
|
Key Vertex
|
|
|
|
DoubleArrowTkn *token.Token
|
2020-12-28 21:01:02 +00:00
|
|
|
Val Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprYieldFrom node
|
|
|
|
type ExprYieldFrom struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 07:42:45 +00:00
|
|
|
YieldFromTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprCastArray node
|
|
|
|
type ExprCastArray struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
CastTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprCastBool node
|
|
|
|
type ExprCastBool struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
CastTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprCastDouble node
|
|
|
|
type ExprCastDouble struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
CastTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprCastInt node
|
|
|
|
type ExprCastInt struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
CastTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprCastObject node
|
|
|
|
type ExprCastObject struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
CastTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprCastString node
|
|
|
|
type ExprCastString struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
CastTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprCastUnset node
|
|
|
|
type ExprCastUnset struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
CastTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssign node
|
|
|
|
type ExprAssign struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignReference node
|
|
|
|
type ExprAssignReference struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
AmpersandTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignBitwiseAnd node
|
|
|
|
type ExprAssignBitwiseAnd struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignBitwiseOr node
|
|
|
|
type ExprAssignBitwiseOr struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignBitwiseXor node
|
|
|
|
type ExprAssignBitwiseXor struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignCoalesce node
|
|
|
|
type ExprAssignCoalesce struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignConcat node
|
|
|
|
type ExprAssignConcat struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignDiv node
|
|
|
|
type ExprAssignDiv struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignMinus node
|
|
|
|
type ExprAssignMinus struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignMod node
|
|
|
|
type ExprAssignMod struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignMul node
|
|
|
|
type ExprAssignMul struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignPlus node
|
|
|
|
type ExprAssignPlus struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignPow node
|
|
|
|
type ExprAssignPow struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignShiftLeft node
|
|
|
|
type ExprAssignShiftLeft struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprAssignShiftRight node
|
|
|
|
type ExprAssignShiftRight struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 08:40:48 +00:00
|
|
|
Var Vertex
|
|
|
|
EqualTkn *token.Token
|
|
|
|
Expr Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryBitwiseAnd node
|
|
|
|
type ExprBinaryBitwiseAnd struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryBitwiseOr node
|
|
|
|
type ExprBinaryBitwiseOr struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryBitwiseXor node
|
|
|
|
type ExprBinaryBitwiseXor struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryBooleanAnd node
|
|
|
|
type ExprBinaryBooleanAnd struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryBooleanOr node
|
|
|
|
type ExprBinaryBooleanOr struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryCoalesce node
|
|
|
|
type ExprBinaryCoalesce struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryConcat node
|
|
|
|
type ExprBinaryConcat struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryDiv node
|
|
|
|
type ExprBinaryDiv struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryEqual node
|
|
|
|
type ExprBinaryEqual struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryGreater node
|
|
|
|
type ExprBinaryGreater struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryGreaterOrEqual node
|
|
|
|
type ExprBinaryGreaterOrEqual struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryIdentical node
|
|
|
|
type ExprBinaryIdentical struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryLogicalAnd node
|
|
|
|
type ExprBinaryLogicalAnd struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryLogicalOr node
|
|
|
|
type ExprBinaryLogicalOr struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryLogicalXor node
|
|
|
|
type ExprBinaryLogicalXor struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryMinus node
|
|
|
|
type ExprBinaryMinus struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryMod node
|
|
|
|
type ExprBinaryMod struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryMul node
|
|
|
|
type ExprBinaryMul struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryNotEqual node
|
|
|
|
type ExprBinaryNotEqual struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryNotIdentical node
|
|
|
|
type ExprBinaryNotIdentical struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryPlus node
|
|
|
|
type ExprBinaryPlus struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryPow node
|
|
|
|
type ExprBinaryPow struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryShiftLeft node
|
|
|
|
type ExprBinaryShiftLeft struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinaryShiftRight node
|
|
|
|
type ExprBinaryShiftRight struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinarySmaller node
|
|
|
|
type ExprBinarySmaller struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinarySmallerOrEqual node
|
|
|
|
type ExprBinarySmallerOrEqual struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ExprBinarySpaceship node
|
|
|
|
type ExprBinarySpaceship struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
|
|
|
Left Vertex
|
|
|
|
OpTkn *token.Token
|
|
|
|
Right Vertex
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
// ExprMatch node is match(expr) { list<MatchArm> }
|
|
|
|
type ExprMatch struct {
|
|
|
|
Position *position.Position
|
|
|
|
MatchTkn *token.Token
|
|
|
|
OpenParenthesisTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
CloseParenthesisTkn *token.Token
|
|
|
|
OpenCurlyBracketTkn *token.Token
|
|
|
|
Arms []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
CloseCurlyBracketTkn *token.Token
|
|
|
|
}
|
|
|
|
|
|
|
|
// ExprThrow node is 'throw Expr'
|
|
|
|
type ExprThrow struct {
|
|
|
|
Position *position.Position
|
|
|
|
ThrowTkn *token.Token
|
|
|
|
Expr Vertex
|
|
|
|
SemiColonTkn *token.Token
|
|
|
|
}
|
|
|
|
|
|
|
|
// MatchArm node is [expr, expr1, ...]|default => return_expr
|
|
|
|
type MatchArm struct {
|
|
|
|
Position *position.Position
|
|
|
|
DefaultTkn *token.Token
|
|
|
|
DefaultCommaTkn *token.Token
|
|
|
|
Exprs []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
|
|
|
DoubleArrowTkn *token.Token
|
|
|
|
ReturnExpr Vertex
|
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
type Name struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 12:38:47 +00:00
|
|
|
Parts []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
2020-05-12 21:16:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type NameFullyQualified struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 12:38:47 +00:00
|
|
|
NsSeparatorTkn *token.Token
|
|
|
|
Parts []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
2020-05-12 21:16:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type NameRelative struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 12:38:47 +00:00
|
|
|
NsTkn *token.Token
|
|
|
|
NsSeparatorTkn *token.Token
|
|
|
|
Parts []Vertex
|
|
|
|
SeparatorTkns []*token.Token
|
2020-05-12 21:16:36 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
type NamePart struct {
|
2020-12-07 22:04:12 +00:00
|
|
|
Position *position.Position
|
2020-12-04 12:38:47 +00:00
|
|
|
StringTkn *token.Token
|
|
|
|
Value []byte
|
2020-05-12 21:16:36 +00:00
|
|
|
}
|