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 ability to use expression as array index within an expression #527

Merged
merged 1 commit into from
Aug 23, 2024

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
5 checks passed
@SteveL-MSFT SteveL-MSFT deleted the expression-index branch August 23, 2024 16:18
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