mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SyntaxColoring] Address review feedback for rdar://problem/33463141 NFC
This commit is contained in:
@@ -300,18 +300,15 @@ struct SwiftEditorCharRange {
|
||||
bool intersects(const SwiftSyntaxToken &Token) const {
|
||||
return this->Offset < (Token.endOffset()) && this->EndOffset > Token.Offset;
|
||||
}
|
||||
void extendToInclude(unsigned OtherOffset) {
|
||||
if (OtherOffset < Offset)
|
||||
Offset = OtherOffset;
|
||||
else if (OtherOffset > EndOffset)
|
||||
EndOffset = OtherOffset;
|
||||
}
|
||||
void extendToInclude(const SwiftEditorCharRange &Range) {
|
||||
if (Range.Offset < Offset)
|
||||
Offset = Range.Offset;
|
||||
if (Range.EndOffset > EndOffset)
|
||||
EndOffset = Range.EndOffset;
|
||||
}
|
||||
void extendToInclude(unsigned OtherOffset) {
|
||||
extendToInclude({OtherOffset, OtherOffset});
|
||||
}
|
||||
};
|
||||
|
||||
/// Finds and represents the first mismatching tokens in two syntax maps,
|
||||
|
||||
Reference in New Issue
Block a user