Lines Matching defs:pos
63 SourcePosition pos{SourceId::Invalid(), LineAndColumn::Invalid(),
65 return pos;
68 bool CompareStartIgnoreColumn(const SourcePosition& pos) const {
69 return start.line == pos.start.line && source == pos.source;
72 bool Contains(LineAndColumn pos) const {
73 if (pos.line < start.line || pos.line > end.line) return false;
75 if (pos.line == start.line && pos.column < start.column) return false;
76 if (pos.line == end.line && pos.column >= end.column) return false;
80 bool operator==(const SourcePosition& pos) const {
81 return source == pos.source && start == pos.start && end == pos.end;
83 bool operator!=(const SourcePosition& pos) const { return !(*this == pos); }
105 inline std::string PositionAsString(SourcePosition pos) {
106 return SourceFileMap::PathFromV8Root(pos.source) + ":" +
107 std::to_string(pos.start.line + 1) + ":" +
108 std::to_string(pos.start.column + 1);
111 inline std::ostream& operator<<(std::ostream& out, SourcePosition pos) {
113 << SourceFileMap::PathFromV8Root(pos.source)
114 << "?l=" << (pos.start.line + 1)
115 << "&c=" << (pos.start.column + 1);