| 58 | } |
| 59 | |
| 60 | int32_t SourcePosition::character_offset() const { |
| 61 | if (source_info_ == nullptr) { |
| 62 | return 0; |
| 63 | } |
| 64 | auto position_it = source_info_->positions().find(expr_id_); |
| 65 | return position_it != source_info_->positions().end() ? position_it->second |
| 66 | : 0; |
| 67 | } |
| 68 | |
| 69 | } // namespace runtime |
| 70 | } // namespace expr |