Skip to content

Commit 5ed277e

Browse files
committed
[Parser] Stop creating PoundFile(ID|Path|)Syntax nodes.
All of these are subsumed by macro expansion expressions.
1 parent f1ef59f commit 5ed277e

File tree

3 files changed

+0
-30
lines changed

3 files changed

+0
-30
lines changed

Sources/SwiftParser/Expressions.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,24 +1017,6 @@ extension Parser {
10171017
poundFile: tok,
10181018
arena: self.arena
10191019
))
1020-
case (.poundFileIDKeyword, let handle)?:
1021-
let tok = self.eat(handle)
1022-
return RawExprSyntax(RawPoundFileIDExprSyntax(
1023-
poundFileID: tok,
1024-
arena: self.arena
1025-
))
1026-
case (.poundFileKeyword, let handle)?:
1027-
let tok = self.eat(handle)
1028-
return RawExprSyntax(RawPoundFileExprSyntax(
1029-
poundFile: tok,
1030-
arena: self.arena
1031-
))
1032-
case (.poundFilePathKeyword, let handle)?:
1033-
let tok = self.eat(handle)
1034-
return RawExprSyntax(RawPoundFilePathExprSyntax(
1035-
poundFilePath: tok,
1036-
arena: self.arena
1037-
))
10381020
case (.__function__Keyword, let handle)?:
10391021
let tok = self.eat(handle)
10401022
return RawExprSyntax(RawPoundFunctionExprSyntax(

Sources/SwiftParser/Lexer.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,9 +1540,6 @@ extension Lexer.Cursor {
15401540
switch literal {
15411541
case "keyPath": kind = .poundKeyPathKeyword
15421542
case "selector": kind = .poundSelectorKeyword
1543-
case "file": kind = .poundFileKeyword
1544-
case "fileID": kind = .poundFileIDKeyword
1545-
case "filePath": kind = .poundFilePathKeyword
15461543
case "assert": kind = .poundAssertKeyword
15471544
case "sourceLocation": kind = .poundSourceLocationKeyword
15481545
case "warning": kind = .poundWarningKeyword

Sources/SwiftParser/RawTokenKindSubset.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,6 @@ enum PrimaryExpressionStart: RawTokenKindSubset {
738738
case nilKeyword
739739
case period
740740
case pound
741-
case poundFileIDKeyword
742-
case poundFileKeyword
743-
case poundFilePathKeyword
744741
case poundKeyPathKeyword
745742
case poundSelectorKeyword
746743
case prefixPeriod
@@ -771,9 +768,6 @@ enum PrimaryExpressionStart: RawTokenKindSubset {
771768
case .nilKeyword: self = .nilKeyword
772769
case .period: self = .period
773770
case .pound: self = .pound
774-
case .poundFileIDKeyword: self = .poundFileIDKeyword
775-
case .poundFileKeyword: self = .poundFileKeyword
776-
case .poundFilePathKeyword: self = .poundFilePathKeyword
777771
case .poundKeyPathKeyword: self = .poundKeyPathKeyword
778772
case .poundSelectorKeyword: self = .poundSelectorKeyword
779773
case .prefixPeriod: self = .prefixPeriod
@@ -807,9 +801,6 @@ enum PrimaryExpressionStart: RawTokenKindSubset {
807801
case .nilKeyword: return .nilKeyword
808802
case .period: return .period
809803
case .pound: return .pound
810-
case .poundFileIDKeyword: return .poundFileIDKeyword
811-
case .poundFileKeyword: return .poundFileKeyword
812-
case .poundFilePathKeyword: return .poundFilePathKeyword
813804
case .poundKeyPathKeyword: return .poundKeyPathKeyword
814805
case .poundSelectorKeyword: return .poundSelectorKeyword
815806
case .prefixPeriod: return .prefixPeriod

0 commit comments

Comments
 (0)