def __contains__(self, other):
if not isinstance(other, SourceLocation):<EOL><INDENT>return False<EOL><DEDENT>if other.file is None and self.start.file is None:<EOL><INDENT>pass<EOL><DEDENT>elif ( self.start.file.name != other.file.name or<EOL>other.file.name != self.end.file.name):<EOL><INDENT>return False<EOL><DEDENT>if self.start.line < other.line < self.end.line:<EOL><INDENT>return True<EOL><DEDENT>elif self.start.line == other.line:<EOL><INDENT>if self.start.column <= other.column:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>elif other.line == self.end.line:<EOL><INDENT>if other.column <= self.end.column:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Useful to detect the Token/Lexer bug