Skip to content

Add ability to use expression as array index within an expression#527

Merged
SteveL-MSFT merged 1 commit intoPowerShell:mainfrom
SteveL-MSFT:expression-index
Aug 23, 2024
Merged

Add ability to use expression as array index within an expression#527
SteveL-MSFT merged 1 commit intoPowerShell:mainfrom
SteveL-MSFT:expression-index

Conversation

@SteveL-MSFT
Copy link
Member

PR Summary

Was doing some ad hoc testing and I had not initially added the ability to use an expression as an array index. Looked it up and ARM templates support it, so added it here.

The only interesting part is now I have an IndexExpression member of the Accessor enum, but both that and just Index needs to actually index into the array. So instead of having the same code within two match blocks, I use a flag to track if it should run outside of the match.

I also considered pulling it out as a helper function, but seemed overkill for this use.

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Aug 23, 2024
Merged via the queue into PowerShell:main with commit ed2b94e Aug 23, 2024
@SteveL-MSFT SteveL-MSFT deleted the expression-index branch August 23, 2024 16:18
@Gijsreyn Gijsreyn mentioned this pull request Sep 26, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants