A struct for encapsulating location information about an operator
and the operation built from it.
m_operator_loc is the location of the operator
m_combined_loc is the location of the compound expression.
For example, given "a && b" the, operator location is:
a && b
^~
and the combined location is:
a && b
~~^~~~
Capturing this information allows for class binary_op_rich_location
to provide detailed information about e.g. type mismatches in binary
operations where enough location information is available:
arg_0 op arg_1
~~~~~ ^~ ~~~~~
| |
| arg1 type
arg0 type
falling back to just showing the combined location:
arg_0 op arg_1
~~~~~~^~~~~~~~
where it is not.