Skip to content

[5.0][CodeCompletion] Eat identifier characters after CC position #20991

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Dec 4, 2018

(Cherry-pick of #20959 for swift-5.0-branch, Not critical for convergence. Not ABI-affecting.)

Text in editors may contain identifier characters following to CC position which should be considered as "filtering text" for the code completion.

Eat identifier characters after CC token in Lexer. By this change, for instance, for @<token>IB class, the parser now can detect this is a start of class declaration and emit class attributes for code completion.

rdar://problem/46103294

Text on editors (e.g. Xcode) may contain identifiers following to CC
position which should be considered as "filtering text" for the code
completion.

For example, a user types '@A' the CC position is between '@' and 'a'.
The user probably expects attributes starting with 'a'.

Eat identifier characters after CC token in Lexer. By this change,
for instance for '@<token>IB class', the parser now can detect this
is a start of class declaration and emit class attributes completions.

rdar://problem/46103294
(cherry picked from commit 56ce861)
@rintaro rintaro requested a review from a team December 4, 2018 02:43
Copy link
Contributor

@akyrtzi akyrtzi left a comment

Choose a reason for hiding this comment

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

Holding to merge after convergence

@akyrtzi
Copy link
Contributor

akyrtzi commented Dec 5, 2018

@swift-ci test and merge

@akyrtzi akyrtzi merged commit 7ff4284 into swiftlang:swift-5.0-branch Dec 5, 2018
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