projects
/
yaffs-website
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
6b77d3357a9dda41e6ee0f52b618202e4449c4ad
[yaffs-website]
/
vendor
/
nikic
/
php-parser
/
test
/
code
/
parser
/
stmt
/
generator
/
yieldUnaryPrecedence.test
1
Yield with unary operator argument
2
-----
3
<?php
4
5
function gen() {
6
yield +1;
7
yield -1;
8
yield * -1;
9
}
10
-----
11
array(
12
0: Stmt_Function(
13
byRef: false
14
name: Identifier(
15
name: gen
16
)
17
params: array(
18
)
19
returnType: null
20
stmts: array(
21
0: Stmt_Expression(
22
expr: Expr_Yield(
23
key: null
24
value: Expr_UnaryPlus(
25
expr: Scalar_LNumber(
26
value: 1
27
)
28
)
29
)
30
)
31
1: Stmt_Expression(
32
expr: Expr_Yield(
33
key: null
34
value: Expr_UnaryMinus(
35
expr: Scalar_LNumber(
36
value: 1
37
)
38
)
39
)
40
)
41
2: Stmt_Expression(
42
expr: Expr_BinaryOp_Mul(
43
left: Expr_Yield(
44
key: null
45
value: null
46
)
47
right: Expr_UnaryMinus(
48
expr: Scalar_LNumber(
49
value: 1
50
)
51
)
52
)
53
)
54
)
55
)
56
)