1package ast
2
3type Expr interface {
4	PositionHolder
5	exprMarker()
6}
7
8type ExprBase struct {
9	Node
10}
11
12func (expr *ExprBase) exprMarker() {}
13
14/* ConstExprs {{{ */
15
16type ConstExpr interface {
17	Expr
18	constExprMarker()
19}
20
21type ConstExprBase struct {
22	ExprBase
23}
24
25func (expr *ConstExprBase) constExprMarker() {}
26
27type TrueExpr struct {
28	ConstExprBase
29}
30
31type FalseExpr struct {
32	ConstExprBase
33}
34
35type NilExpr struct {
36	ConstExprBase
37}
38
39type NumberExpr struct {
40	ConstExprBase
41
42	Value string
43}
44
45type StringExpr struct {
46	ConstExprBase
47
48	Value string
49}
50
51/* ConstExprs }}} */
52
53type Comma3Expr struct {
54	ExprBase
55}
56
57type IdentExpr struct {
58	ExprBase
59
60	Value string
61}
62
63type AttrGetExpr struct {
64	ExprBase
65
66	Object Expr
67	Key    Expr
68}
69
70type TableExpr struct {
71	ExprBase
72
73	Fields []*Field
74}
75
76type FuncCallExpr struct {
77	ExprBase
78
79	Func      Expr
80	Receiver  Expr
81	Method    string
82	Args      []Expr
83	AdjustRet bool
84}
85
86type LogicalOpExpr struct {
87	ExprBase
88
89	Operator string
90	Lhs      Expr
91	Rhs      Expr
92}
93
94type RelationalOpExpr struct {
95	ExprBase
96
97	Operator string
98	Lhs      Expr
99	Rhs      Expr
100}
101
102type StringConcatOpExpr struct {
103	ExprBase
104
105	Lhs Expr
106	Rhs Expr
107}
108
109type ArithmeticOpExpr struct {
110	ExprBase
111
112	Operator string
113	Lhs      Expr
114	Rhs      Expr
115}
116
117type UnaryMinusOpExpr struct {
118	ExprBase
119	Expr Expr
120}
121
122type UnaryNotOpExpr struct {
123	ExprBase
124	Expr Expr
125}
126
127type UnaryLenOpExpr struct {
128	ExprBase
129	Expr Expr
130}
131
132type FunctionExpr struct {
133	ExprBase
134
135	ParList *ParList
136	Stmts   []Stmt
137}
138