@@ -790,7 +790,7 @@ fileprivate let testFileData = [
790
790
}
791
791
func endPreprocessorInclusion( ) {
792
792
}
793
- func foundMacroValueAssignment( _ macroName: String , conditions: [ ( param: String , pattern: String ) ] , value: String , path: Path , line : Int , startColumn: Int , endColumn: Int , parser: MacroConfigFileParser ) {
793
+ func foundMacroValueAssignment( _ macroName: String , conditions: [ ( param: String , pattern: String ) ] , value: String , path: Path , startLine : Int , endLine : Int , startColumn: Int , endColumn: Int , parser: MacroConfigFileParser ) {
794
794
}
795
795
796
796
func handleDiagnostic( _ diagnostic: MacroConfigFileDiagnostic , parser: MacroConfigFileParser ) {
@@ -816,10 +816,10 @@ fileprivate let testFileData = [
816
816
] ,
817
817
expectedDiagnostics: [ ] ,
818
818
expectedLocations: [
819
- ( macro: " FEATURE_DEFINES_A " , path: . init( " Multiline.xcconfig " ) , line : 2 , startColumn: 20 , endColumn: 37 ) ,
820
- ( macro: " FEATURE_DEFINES_B " , path: . init( " Multiline.xcconfig " ) , line : 5 , startColumn: 20 , endColumn: 87 ) ,
821
- ( macro: " FEATURE_DEFINES_C " , path: . init( " Multiline.xcconfig " ) , line : 9 , startColumn: 20 , endColumn: 61 ) ,
822
- ( macro: " FEATURE_DEFINES_D " , path: . init( " Multiline.xcconfig " ) , line : 11 , startColumn: 20 , endColumn: 45 ) ,
819
+ ( macro: " FEATURE_DEFINES_A " , path: . init( " Multiline.xcconfig " ) , startLine : 1 , endLine : 2 , startColumn: 20 , endColumn: 37 ) ,
820
+ ( macro: " FEATURE_DEFINES_B " , path: . init( " Multiline.xcconfig " ) , startLine : 3 , endLine : 5 , startColumn: 20 , endColumn: 87 ) ,
821
+ ( macro: " FEATURE_DEFINES_C " , path: . init( " Multiline.xcconfig " ) , startLine : 6 , endLine : 9 , startColumn: 20 , endColumn: 61 ) ,
822
+ ( macro: " FEATURE_DEFINES_D " , path: . init( " Multiline.xcconfig " ) , startLine : 10 , endLine : 11 , startColumn: 20 , endColumn: 45 ) ,
823
823
] ,
824
824
expectedIncludeDirectivesCount: 1
825
825
)
@@ -830,7 +830,7 @@ fileprivate let testFileData = [
830
830
typealias ConditionInfo = ( param: String , pattern: String )
831
831
typealias AssignmentInfo = ( macro: String , conditions: [ ConditionInfo ] , value: String )
832
832
typealias DiagnosticInfo = ( level: MacroConfigFileDiagnostic . Level , kind: MacroConfigFileDiagnostic . Kind , line: Int )
833
- typealias LocationInfo = ( macro: String , path: Path , line : Int , startColumn: Int , endColumn: Int )
833
+ typealias LocationInfo = ( macro: String , path: Path , startLine : Int , endLine : Int , startColumn: Int , endColumn: Int )
834
834
835
835
private func TestMacroConfigFileParser( _ string: String , expectedAssignments: [ AssignmentInfo ] , expectedDiagnostics: [ DiagnosticInfo ] , expectedLocations: [ LocationInfo ] ? = nil , expectedIncludeDirectivesCount: Int , sourceLocation: SourceLocation = #_sourceLocation) {
836
836
@@ -856,10 +856,10 @@ private func TestMacroConfigFileParser(_ string: String, expectedAssignments: [A
856
856
func endPreprocessorInclusion( ) {
857
857
self . includeDirectivesCount += 1
858
858
}
859
- func foundMacroValueAssignment( _ macroName: String , conditions: [ ( param: String , pattern: String ) ] , value: String , path: Path , line : Int , startColumn: Int , endColumn: Int , parser: MacroConfigFileParser ) {
859
+ func foundMacroValueAssignment( _ macroName: String , conditions: [ ( param: String , pattern: String ) ] , value: String , path: Path , startLine : Int , endLine : Int , startColumn: Int , endColumn: Int , parser: MacroConfigFileParser ) {
860
860
// print("\(parser.lineNumber): \(macroName)\(conditions.map({ "[\($0.param)=\($0.pattern)]" }).joinWithSeparator(""))=\(value)")
861
861
assignments. append ( ( macro: macroName, conditions: conditions, value: value) )
862
- locations. append ( ( macro: macroName, path: path, line : line , startColumn: startColumn, endColumn: endColumn) )
862
+ locations. append ( ( macro: macroName, path: path, startLine : startLine , endLine : endLine , startColumn: startColumn, endColumn: endColumn) )
863
863
}
864
864
func handleDiagnostic( _ diagnostic: MacroConfigFileDiagnostic , parser: MacroConfigFileParser ) {
865
865
// print("\(parser.lineNumber): \(diagnostic)")
@@ -913,7 +913,7 @@ func ==(lhs: [DiagnosticInfo], rhs: [DiagnosticInfo]) -> Bool {
913
913
}
914
914
915
915
func == ( lhs: LocationInfo, rhs: LocationInfo) - > Bool {
916
- return ( lhs. macro == rhs. macro) && ( lhs. path == rhs. path) && ( lhs. line == rhs. line ) && ( lhs. startColumn == rhs. startColumn) && ( lhs. endColumn == rhs. endColumn)
916
+ return ( lhs. macro == rhs. macro) && ( lhs. path == rhs. path) && ( lhs. startLine == rhs. startLine ) && ( lhs . endLine == rhs . endLine ) && ( lhs. startColumn == rhs. startColumn) && ( lhs. endColumn == rhs. endColumn)
917
917
}
918
918
919
919
func == ( lhs: [ LocationInfo] , rhs: [ LocationInfo] ) - > Bool {
0 commit comments