GetStopLocation calculates the human-readable 1-based line and 0-based column of the last character for the expression node at the given id. If the SourceInfo was generated from a serialized protobuf representation, the stop location will be identical to the start location for the expression.
(id int64)
| 387 | // If the SourceInfo was generated from a serialized protobuf representation, the stop location will |
| 388 | // be identical to the start location for the expression. |
| 389 | func (s *SourceInfo) GetStopLocation(id int64) common.Location { |
| 390 | if o, found := s.GetOffsetRange(id); found { |
| 391 | return s.GetLocationByOffset(o.Stop) |
| 392 | } |
| 393 | return common.NoLocation |
| 394 | } |
| 395 | |
| 396 | // GetLocationByOffset returns the line and column information for a given character offset. |
| 397 | func (s *SourceInfo) GetLocationByOffset(offset int32) common.Location { |