php-parser/test/code/parser/stmt
Nikita Popov d3d1ee470a Fix #738 incorrect start line for traits
Empty productions are supposed to be assigned the start attributes
of the lookahead token. Currently, this happens by assigning above
the current stack position when the token it read.

This fails in a situation where we first reduce an empty production
higher up in the stack, and then again reduce an empty production
lower in the stack, without consuming the lookahead token in the
meantime.

Fix this by moving the assignment into the reduction phase. We
also need to do this for error productions, which are effectively
empty.
2020-12-20 10:52:47 +01:00
..
class Fix #738 incorrect start line for traits 2020-12-20 10:52:47 +01:00
function [PHP 8.0] Add attributes support (#661) 2020-09-13 21:01:17 +02:00
generator [PHP 8.0] Add attributes support (#661) 2020-09-13 21:01:17 +02:00
loop [PHP 7.4] Add array spread 2019-05-09 19:15:35 +02:00
namespace Remove self/parent/static restriction for namespace names 2020-08-09 21:21:22 +02:00
attributes.test [PHP 8.0] Add attributes support (#661) 2020-09-13 21:01:17 +02:00
blocklessStatement.test Always use Identifier nodes 2017-04-28 20:57:32 +02:00
const.test Always use Identifier nodes 2017-04-28 20:57:32 +02:00
controlFlow.test Always use Identifier nodes 2017-04-28 20:57:32 +02:00
declare.test Always use Identifier nodes 2017-04-28 20:57:32 +02:00
echo.test Insert comments when pretty printing 2012-05-11 16:18:14 +02:00
haltCompiler.test Perform automated test update 2017-01-19 22:25:22 +01:00
haltCompilerInvalidSyntax.test Perform automated test update 2017-01-19 22:25:22 +01:00
haltCompilerOffset.test Add named argument support 2020-08-09 17:37:44 +02:00
haltCompilerOutermostScope.test Perform automated test update 2017-01-19 22:25:22 +01:00
hashbang.test Perform automated test update 2017-01-19 22:25:22 +01:00
if.test Introduce Nop statement to collect dangling comments 2016-03-09 19:48:36 +01:00
inlineHTML.test Perform automated test update 2017-01-19 22:25:22 +01:00
multiCatch.test Enforce useConsistentVariableNames 2017-01-19 23:24:43 +01:00
switch.test Fix duplicate switch comment assignment 2018-01-30 23:06:20 +01:00
tryCatch_without_variable.test Add constructor promotion support 2020-06-27 17:57:47 +02:00
tryCatch.test Enforce useConsistentVariableNames 2017-01-19 23:24:43 +01:00
tryWithoutCatch.test Perform automated test update 2017-01-19 22:25:22 +01:00
unset.test Insert comments when pretty printing 2012-05-11 16:18:14 +02:00