Skip to content
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

Improve lexing of nested data structures in PowerShell lexer #1622

Merged
merged 2 commits into from
Nov 10, 2020

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Nov 9, 2020

While #1595 improved the lexing of nested data structures, the PowerShell lexer still struggles with nested data structures (as reported in #1612). This PR moves more of the syntax for representing values from the :root state to the :expr state so that this syntax can work when nested.

This fixes #1612.

@pyrmont pyrmont self-assigned this Nov 9, 2020
@pyrmont
Copy link
Contributor Author

pyrmont commented Nov 9, 2020

@pekspro Thanks for reporting the error. I've done a bit more refactoring and it now looks to me like the example structure you provided is working 🎉

@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Nov 9, 2020
@pekspro
Copy link

pekspro commented Nov 9, 2020

Thank you for spending time solving my issues, @pyrmont. I have huge respect for what you are doing.

@pyrmont pyrmont merged commit d7e67da into rouge-ruby:master Nov 10, 2020
@pyrmont pyrmont deleted the bugfix.powershell-custom-objects branch November 10, 2020 17:23
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Nov 10, 2020
mattt pushed a commit to NSHipster/rouge that referenced this pull request May 19, 2021
…uby#1622)

While rouge-ruby#1595 improved the lexing of more complex structures, the
PowerShell lexer is limited in its support for nested data structures.
This commit moves more of the syntax for representing values from the
`:root` state to the `:expr` state so that this syntax can work when
nested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PowerShell with custom object
3 participants