restoring parser execution flow after abandoning given-when operators and test for parser#204
restoring parser execution flow after abandoning given-when operators and test for parser#204perrero wants to merge 1 commit intorichterger:masterfrom
Conversation
… and test for parser
|
What is the problem your fix should solve? As far as I read the code the removed containue statement did nothing anyway in the past? |
The problem is in the parser's generation of a token with the package name. This adds support for quickly jumping to a module by module name in VSCODE (via Ctrl+T).
Instead of a continue operator, a block is named with a label FINISH_BLOCK and a GOTO FINISH_BLOCK operator is used. It's not pretty, but it works (sorry, but I can't think of a better replacement for the lost functionality of "given-when" for this case).
Yes, file t/01-Parser.t contains the required case, the first token without a patch looks like this {name='main::'}, and with a patch - like this {name='My::Package'}. Thank you from the community for this useful tool! |
Added test t/01-Parser.t and simple workaround for dropped continue operator functionality in 'given-when' statement.