-
Notifications
You must be signed in to change notification settings - Fork 8k
Commit d85662d
Improve accuracy of ext_stmt emits during pipe operations
We need to emit the EXT_STMT opcode before we compile the call, so that we
attach the line number of where the right hand pipe operator starts.
We also do not need to reset the line number anymore.
The following code shows where these EXT_STMTs are introduced.
```
<?php
/* EXT_STMT */ $myString = "<Hello World>";
$result = /* EXT_STMT */ $myString
|> /* EXT_STMT(!0:$myString) */ \htmlentities(...)
|>
/* EXT_STMT(4ドル) */ \str_split(...)
|> /* EXT_STMT(6ドル) */ (fn($x) => array_map(strtoupper(...), $x))
|> /* EXT_STMT(9ドル) */ (fn($x) => join( ', ', $x));
/* EXT_STMT */ echo $result, /* EXT_STMT */ "\n";
```1 parent 326c254 commit d85662d
1 file changed
+2
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6534 | 6534 |
| |
6535 | 6535 |
| |
6536 | 6536 |
| |
6537 | + | ||
6538 | + | ||
6537 | 6539 |
| |
6538 | - | ||
6539 | - | ||
6540 | 6540 |
| |
6541 | 6541 |
| |
6542 | 6542 |
| |
|
0 commit comments