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

Allow position specifiers in stringsdict variables #52

Merged
merged 2 commits into from
May 26, 2023

Conversation

stevelandeyasana
Copy link
Collaborator

@stevelandeyasana stevelandeyasana force-pushed the steve/recognize-positioned-stringsdict-args branch from eb6b922 to 0bb2469 Compare April 25, 2023 21:00
@@ -78,7 +78,7 @@ struct Expressions {
pattern: Expressions.nativeArgumentExpression,
options: [])

private static let stringsdictArgumentExpression = #"%#@(?<name>.+?)@"#
private static let stringsdictArgumentExpression = #"%[0-9]*\$?#@(?<name>.+?)@"#

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strictly speaking, shouldn't there be parentheses around [0-9]*\$ so that the entire thing is question-marked at once or not at all?

i.e. the latter instead of the former, since the last two are spurious matches that are incorrect syntax afaik?

Screenshot 2023-04-25 at 5 05 29 PM

Screenshot 2023-04-25 at 5 05 45 PM

Copy link

@asana-jau asana-jau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving but I think we should add the parentheses to be stricter :) thanks for fixing!

@mary-xu mary-xu assigned stevelandeyasana and unassigned mary-xu May 26, 2023
@stevelandeyasana stevelandeyasana merged commit 7562507 into main May 26, 2023
@stevelandeyasana stevelandeyasana deleted the steve/recognize-positioned-stringsdict-args branch May 26, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants