MCPcopy
hub / github.com/valyala/quicktemplate / Context

Method Context

parser/scanner.go:452–456  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

450}
451
452func (s *scanner) Context() string {
453 t := s.Token()
454 return fmt.Sprintf("file %q, line %d, pos %d, token %s, last line %s",
455 s.filePath, t.line+1, t.pos, snippet(t.Value), snippet(s.lineStr))
456}
457
458func (s *scanner) WriteLineComment(w io.Writer) {
459 fmt.Fprintf(w, "//line %s:%d\n", s.filePath, s.t.line+1)

Callers 15

LastErrorMethod · 0.95
parseTemplateMethod · 0.80
parseFuncMethod · 0.80
parseForMethod · 0.80
parseDefaultMethod · 0.80
parseCaseMethod · 0.80
parseCatMethod · 0.80
parseSwitchMethod · 0.80
parseIfMethod · 0.80
skipAfterTagMethod · 0.80
parseInterfaceMethod · 0.80
parsePackageNameMethod · 0.80

Calls 2

TokenMethod · 0.95
snippetFunction · 0.85

Tested by

no test coverage detected