(r io.Reader, filePath string)
| 76 | var prevBlank = regexp.MustCompile(`[[:blank:]]+$`) |
| 77 | |
| 78 | func newScanner(r io.Reader, filePath string) *scanner { |
| 79 | // Substitute backslashes with forward slashes in filePath |
| 80 | // for the sake of consistency on different platforms (windows, linux). |
| 81 | // See https://github.com/valyala/quicktemplate/issues/62. |
| 82 | filePath = strings.Replace(filePath, "\\", "/", -1) |
| 83 | |
| 84 | return &scanner{ |
| 85 | r: bufio.NewReader(r), |
| 86 | filePath: filePath, |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | func (s *scanner) Rewind() { |
| 91 | if s.rewind { |
no outgoing calls
searching dependent graphs…