(body string, pos int)
| 155 | } |
| 156 | |
| 157 | func pos(body string, pos int) (line int, col int) { |
| 158 | line = 1 |
| 159 | col = 1 |
| 160 | for i, char := range body { |
| 161 | if i >= pos { |
| 162 | break |
| 163 | } |
| 164 | |
| 165 | if char == '\n' { |
| 166 | line++ |
| 167 | col = 1 |
| 168 | } else { |
| 169 | col++ |
| 170 | } |
| 171 | } |
| 172 | return line, col |
| 173 | } |
| 174 | |
| 175 | type nestingFunc string |
| 176 |
no outgoing calls