getLocation method

  1. @override
Location getLocation(
  1. int left_loc,
  2. int right_loc
)
override

See IMessaageHandler for a description of the List

Implementation

@override
Location getLocation(int left_loc, int right_loc) {
  var length = (right_loc < streamLength ? right_loc : streamLength - 1) -
      left_loc +
      1;
  return Location(
    left_loc,
    length,
    getLineNumberOfCharAt(left_loc),
    getColumnOfCharAt(left_loc),
    getLineNumberOfCharAt(right_loc),
    getColumnOfCharAt(right_loc)
  );
}