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

Add array index support to expression grammar #514

Merged
merged 9 commits into from
Aug 13, 2024

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Aug 4, 2024

PR Summary

Add array index syntax support to expressions.

  • tree-sitter grammar updated which includes removing bracketInStringLiteral as that is no longer valid as array index results in a bracket within an expression
  • as part of tree-sitter-grammar change, collapse member and index as accessors that follow a function
  • added more tests to tree-sitter corpus which also needed to be moved to under a test folder to be discovered correctly now
  • the DSC parser updated to use the new tree-sitter output and also added handling for errors following a valid statement

Fix #509

@SteveL-MSFT SteveL-MSFT changed the title WIP: Add array index support to expression grammar Add array index support to expression grammar Aug 7, 2024
@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Aug 13, 2024
Merged via the queue into PowerShell:main with commit 45789c5 Aug 13, 2024
4 checks passed
@SteveL-MSFT SteveL-MSFT deleted the array-index branch August 13, 2024 20:42
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.

Expressions is missing array index support
2 participants