Skip to content

[SR-11372] Reexamine source ranges and handling of interpolated string literals and editor place holders #53773

Closed
@swift-ci

Description

@swift-ci
Previous ID SR-11372
Radar rdar://problem/54809173
Original Reporter davidungar (JIRA User)
Type Task
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Task
Assignee None
Priority Medium

md5: 3db18702a091bcd5f20c88872f256098

Issue Description:

The new ASTScope lookup mechanism needs to query ASTNodes for some sort of source range such that any name to be looked up within the context of the node lies within the source range. However, the source ranges assigned to these two literals is just a point at the start of each, in keeping with other uses of source ranges. As a result, the ASTScope mechanism must do extra work, including relexing, to find the true location of the last look-upable token in any expression.

I suspect that interpolated string literals are both tokens and expressions and that there must be some more principled way to deal with them in the compiler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilerThe Swift compiler itselftask

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions