[SyntaxColoring] Address review feedback for rdar://problem/33463141 NFC

This commit is contained in:
Nathan Hawes
2017-07-24 15:22:10 -07:00
parent 5b82a25240
commit d12d7c1b12

View File

@@ -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,