File gets the filename where the current token originated.
()
| 257 | |
| 258 | // File gets the filename where the current token originated. |
| 259 | func (d *Dispenser) File() string { |
| 260 | if d.cursor < 0 || d.cursor >= len(d.tokens) { |
| 261 | return "" |
| 262 | } |
| 263 | return d.tokens[d.cursor].File |
| 264 | } |
| 265 | |
| 266 | // Args is a convenience function that loads the next arguments |
| 267 | // (tokens on the same line) into an arbitrary number of strings |