Relative produces a RelativeSource object for the content provided at the absolute location within the parent Source as indicated by the line and column.
(content string, line, col int)
| 38 | // Relative produces a RelativeSource object for the content provided at the absolute location |
| 39 | // within the parent Source as indicated by the line and column. |
| 40 | func (src *Source) Relative(content string, line, col int) *RelativeSource { |
| 41 | return &RelativeSource{ |
| 42 | Source: src.Source, |
| 43 | localSrc: common.NewStringSource(content, src.Description()), |
| 44 | absLoc: common.NewLocation(line, col), |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // RelativeSource represents an embedded source element within a larger source. |
| 49 | type RelativeSource struct { |
no test coverage detected