Skip to content

Add array index support to expression grammar#514

Merged
SteveL-MSFT merged 9 commits intoPowerShell:mainfrom
SteveL-MSFT:array-index
Aug 13, 2024
Merged

Add array index support to expression grammar#514
SteveL-MSFT merged 9 commits intoPowerShell:mainfrom
SteveL-MSFT:array-index

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 requested review from anmenaga and tgauth August 7, 2024 19:53
@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
@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