We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cde46a9 commit 8ea3cc5Copy full SHA for 8ea3cc5
test/precedence.js
@@ -119,11 +119,24 @@ describe('Test precedence', function() {
119
it('test + / *', function() {
120
shouldBeSame('1 + 2 * 3', '1 + (2 * 3)');
121
});
122
- it('test assign', function() {
123
- // https://github.com/glayzzle/php-parser/issues/81
+ // https://github.com/glayzzle/php-parser/issues/81
+ it('test assign with and', function() {
124
shouldBeSame(
125
'$a and $b = $c and $d',
126
'($a and ($b = $c)) and $d'
127
);
128
129
+ it('test assign list', function() {
130
+ shouldBeSame(
131
+ '$a = $b = $c',
132
+ '($a = ($b = $c))'
133
+ );
134
+ });
135
+ it('test assign with &&', function() {
136
137
+ '$a && $b = $c && $d',
138
+ '$a && ($b = ($c && $d))'
139
140
141
+
142
0 commit comments