swift-book icon indicating copy to clipboard operation
swift-book copied to clipboard

Grammar doesn't include labelled string interpolation

Open woolsweater opened this issue 4 years ago • 4 comments

Previous ID SR-14030
Radar rdar://problem/73014172
Original Reporter @woolsweater
Type Bug

Environment

Swift Book v5.3 on swift.org

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, Documentation
Assignee None
Priority Medium

md5: f52f6b8e5201224bbb536e153db0c38b

Issue Description:

The grammar rule for "interpolated-text-item" specifies a single expression inside parentheses:

interpolated-text-item → \ ( expression ) | quoted-text-item

but Swift actually accepts the equivalent of a tuple expression after the backslash, something like:

interpolated-text-item → \ ( interpolated-text-list ) | quoted-text-item
interpolated-text-list → interpolated-text-element | interpolated-text-element , interpolated-text-list
interpolated-text-element → expression | identifier : expression

woolsweater avatar Jan 10 '21 03:01 woolsweater

@swift-ci create

typesanitizer avatar Jan 11 '21 22:01 typesanitizer

Hi there,

I want to contribute to this project and take on this issue as my first task. Could you please assign it to me? I am excited to work towards resolving it and will keep the team updated on my progress.

Thanks

AbhishekSharma55 avatar Mar 06 '24 07:03 AbhishekSharma55

Hello, @AbhishekSharma55,

Please feel free to work on this, but note that the language reference where this issue is seen lives in a different repository, https://github.com/apple/swift-book.


@xedin Please transfer this.

AnthonyLatsis avatar Mar 06 '24 07:03 AnthonyLatsis

Thank you for pointing out the location of the language reference repository. I appreciate the clarification. I'll make sure to focus on this issue in the appropriate repository moving forward.

AbhishekSharma55 avatar Mar 06 '24 08:03 AbhishekSharma55