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)
| 383 | // GetStartLocation calculates the human-readable 1-based line and 0-based column of the first character |
| 384 | // of the expression node at the id. |
| 385 | func (s *SourceInfo) GetStartLocation(id int64) common.Location { |
| 386 | if o, found := s.GetOffsetRange(id); found { |
| 387 | return s.GetLocationByOffset(o.Start) |
| 388 | } |
| 389 | return common.NoLocation |
| 390 | } |
| 391 | |
| 392 | // GetStopLocation calculates the human-readable 1-based line and 0-based column of the last character for |
| 393 | // the expression node at the given id. |