New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ehuelsmann update perl #711
Closed
Closed
Conversation
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
Also update gherkin-perl.razor to fix the indentation of the line checking for the 'eof' token.
The Rule and Example rules are new since the last update. The Scenario Outline and Scenario line are now synonyms, meaning that the ScenarioOutline matching rule itself can be removed from the token matcher, but the Scenario token match should also match the Scenario Outline.
The token tests show that the language token is case-insensitive (tests say 'Language', but the module wanted 'language'). The token tests show that the DocStringSeparator token wants the actual token 'keyword' matched to be included in the token output. The token tests show that the scenario outline is reported as a keyword match on the ScenarioLine (whereas it used to be its own token class ScenarioOutlineLine).
Some time between the last update and the current Berp grammar, underscores were removed from the rule names. This commit adjusts.
Concluding from the input provided by the *.feature.token files, the token builder should return valid UTF-8, not UTF-8-characters escaped-using Perl's character encodings "\N{<charnum>}".
From review of the *.feature.ast.ndjson files, it's clear that the AST should not include empty arrays or empty strings. There already is a function to remove empty values, extend it to remove empty arrays (whose values *are* defined). Additionally, check for empty strings and add those to the AST as `undef`.
The Perl implementation AST doesn't conform to the ASTs specified in *.feature.ast.ndjson. This commit is the first step to generate compliant output -- the document level.
Various AST incompliances fixed: - Removed unexpected 'type' key appearing all over the place - Data table and doc string under 'argument' key - Docstring delimiter not included in docstring - ScenarioOutline merged with Scenario AST item - Rule processing added to the AstBuilder
Without this change, the test suite fails on UTF-8 tokens.
…output Because the parser now returns a fully compliant AST, don't wrap the AST in a gherkinDocument in the test-output generator.
This fixes compliance with all the *.feature.pickles.ndjson verification files, except for the values of the `id` attributes (for which I have a question outstanding of how to calculate them) and the new 'Rule'/'Example' keywords.
…nerate-pickles The pickle compiler returns the full document to be serialized now, so there's no need to create a wrapper around it before serializing.
…tion Because the backgrounds of the feature and the rule are concatenated, a bit more refactoring was required than simply pickling the Rule section of the AST.
This change helps a lot for reading the output while debugging.
11 tasks
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
stale
bot
added
the
⌛ stale
Will soon be closed by stalebot unless there is activity
label
Nov 29, 2019
This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR supersedes #694 with additional build tweaks