MCPcopy Create free account
hub / github.com/dop251/goja / Add

Method Add

parser/error.go:128–130  ·  view source on GitHub ↗

Add adds an Error with given position and message to an ErrorList.

(position file.Position, msg string)

Source from the content-addressed store, hash-verified

126
127// Add adds an Error with given position and message to an ErrorList.
128func (self *ErrorList) Add(position file.Position, msg string) {
129 *self = append(*self, &Error{position, msg})
130}
131
132// Reset resets an ErrorList to no errors.
133func (self *ErrorList) Reset() { *self = (*self)[0:0] }

Callers 1

errorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected