-
Notifications
You must be signed in to change notification settings - Fork 439
Rename some SyntaxClassification
#1998
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
Rename some SyntaxClassification
#1998
Conversation
@@ -269,7 +269,7 @@ public class ClassificationTests: XCTestCase { | |||
assertClassification( | |||
#"#sourceLocation(file: "x", line: 1)"#, | |||
expected: [ | |||
ClassificationSpec(source: "#sourceLocation", kind: .poundDirective), | |||
ClassificationSpec(source: "#sourceLocation", kind: .identifier), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think #sourceLocation
being classified as .identifier
makes more sense than .ifConfigDirective
after the renaming. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that keyword
might be the best classification, actually.
#sourceLocation
is different than macros in that it modifies global state (namely the evaluation of#file
and#line
for all following lines)file
andline
are also classified as keywords- It’s what we get by default, so it’s the least amount of work 😉
Here is the corresponding sourcekit-lsp pr. swiftlang/sourcekit-lsp#794 |
@@ -269,7 +269,7 @@ public class ClassificationTests: XCTestCase { | |||
assertClassification( | |||
#"#sourceLocation(file: "x", line: 1)"#, | |||
expected: [ | |||
ClassificationSpec(source: "#sourceLocation", kind: .poundDirective), | |||
ClassificationSpec(source: "#sourceLocation", kind: .identifier), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that keyword
might be the best classification, actually.
#sourceLocation
is different than macros in that it modifies global state (namely the evaluation of#file
and#line
for all following lines)file
andline
are also classified as keywords- It’s what we get by default, so it’s the least amount of work 😉
61c0e74
to
9621a00
Compare
@StevenWong12 There’s a merge conflict. Could you rebase your PR? |
9621a00
to
d7caad1
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
Could you trigger the test with swiftlang/sourcekit-lsp#794 again? |
@swift-ci please test |
1 similar comment
@swift-ci please test |
Rename some
SyntaxClassification
and deprecate some out-of-date types.