-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
73 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1490,9 +1490,6 @@ array( | |
) | ||
) | ||
) | ||
comments: array( | ||
0: /** @var ?string */ | ||
) | ||
) | ||
) | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters