MCPcopy Create free account
hub / github.com/brimdata/super / formatSpanError

Function formatSpanError

compiler/srcfiles/error.go:65–72  ·  view source on GitHub ↗
(b *strings.Builder, line string, start, end Position)

Source from the content-addressed store, hash-verified

63}
64
65func formatSpanError(b *strings.Builder, line string, start, end Position) {
66 b.WriteString(strings.Repeat(" ", start.Column-1))
67 n := end.Column - start.Column + 1
68 if start.Line != end.Line {
69 n = len(line) - start.Column + 1
70 }
71 b.WriteString(strings.Repeat("~", n))
72}
73
74func formatPointError(b *strings.Builder, start Position) {
75 col := start.Column - 1

Callers 1

ErrorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected