MCPcopy Create free account
hub / github.com/foxcpp/maddy / Line

Method Line

framework/config/lexer/dispenser.go:166–171  ·  view source on GitHub ↗

Line gets the line number of the current token. If there is no token loaded, it returns 0.

()

Source from the content-addressed store, hash-verified

164// Line gets the line number of the current token. If there is no token
165// loaded, it returns 0.
166func (d *Dispenser) Line() int {
167 if d.cursor < 0 || d.cursor >= len(d.tokens) {
168 return 0
169 }
170 return d.tokens[d.cursor].Line
171}
172
173// File gets the filename of the current token. If there is no token loaded,
174// it returns the filename originally given when parsing started.

Callers 3

SyntaxErrMethod · 0.95
ErrMethod · 0.95
readNodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected