@@ -790,7 +790,7 @@ fileprivate let testFileData = [
790790 }
791791 func endPreprocessorInclusion( ) {
792792 }
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 ) {
794794 }
795795
796796 func handleDiagnostic( _ diagnostic: MacroConfigFileDiagnostic , parser: MacroConfigFileParser ) {
@@ -816,10 +816,10 @@ fileprivate let testFileData = [
816816 ] ,
817817 expectedDiagnostics: [ ] ,
818818 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 ) ,
823823 ] ,
824824 expectedIncludeDirectivesCount: 1
825825 )
@@ -830,7 +830,7 @@ fileprivate let testFileData = [
830830typealias ConditionInfo = ( param: String , pattern: String )
831831typealias AssignmentInfo = ( macro: String , conditions: [ ConditionInfo ] , value: String )
832832typealias 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 )
834834
835835private func TestMacroConfigFileParser( _ string: String , expectedAssignments: [ AssignmentInfo ] , expectedDiagnostics: [ DiagnosticInfo ] , expectedLocations: [ LocationInfo ] ? = nil , expectedIncludeDirectivesCount: Int , sourceLocation: SourceLocation = #_sourceLocation) {
836836
@@ -856,10 +856,10 @@ private func TestMacroConfigFileParser(_ string: String, expectedAssignments: [A
856856 func endPreprocessorInclusion( ) {
857857 self . includeDirectivesCount += 1
858858 }
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 ) {
860860 // print("\(parser.lineNumber): \(macroName)\(conditions.map({ "[\($0.param)=\($0.pattern)]" }).joinWithSeparator(""))=\(value)")
861861 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) )
863863 }
864864 func handleDiagnostic( _ diagnostic: MacroConfigFileDiagnostic , parser: MacroConfigFileParser ) {
865865 // print("\(parser.lineNumber): \(diagnostic)")
@@ -913,7 +913,7 @@ func ==(lhs: [DiagnosticInfo], rhs: [DiagnosticInfo]) -> Bool {
913913}
914914
915915func == ( 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)
917917}
918918
919919func == ( lhs: [ LocationInfo] , rhs: [ LocationInfo] ) - > Bool {
0 commit comments