GetStartLocation calculates the human-readable 1-based line and 0-based column of the first character of the expression node at the id.
(id int64)
| 375 | // GetStartLocation calculates the human-readable 1-based line and 0-based column of the first character |
| 376 | // of the expression node at the id. |
| 377 | func (s *SourceInfo) GetStartLocation(id int64) common.Location { |
| 378 | if o, found := s.GetOffsetRange(id); found { |
| 379 | return s.GetLocationByOffset(o.Start) |
| 380 | } |
| 381 | return common.NoLocation |
| 382 | } |
| 383 | |
| 384 | // GetStopLocation calculates the human-readable 1-based line and 0-based column of the last character for |
| 385 | // the expression node at the given id. |