MCPcopy
hub / github.com/google/go-jsonnet / makeUnexpectedError

Function makeUnexpectedError

internal/parser/parser.go:30–33  ·  view source on GitHub ↗

---------------------------------------------------------------------------

(t *token, while string)

Source from the content-addressed store, hash-verified

28// ---------------------------------------------------------------------------
29
30func makeUnexpectedError(t *token, while string) errors.StaticError {
31 return errors.MakeStaticError(
32 fmt.Sprintf("Unexpected: %v", t), t.loc).WithContext(while)
33}
34
35func locFromTokens(begin, end *token) ast.LocationRange {
36 return ast.LocationRangeBetween(&begin.loc, &end.loc)

Callers 2

parseObjectRemainderMethod · 0.85
parseTerminalMethod · 0.85

Calls 2

MakeStaticErrorFunction · 0.92
WithContextMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…