You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
479 B
Go

package errors
import "golox/token"
type Logger interface {
Error(line int, message string)
ErrorAtToken(t token.Token, message string)
RuntimeError(message string)
}
type mockErrorLogger struct{}
func (el *mockErrorLogger) Error(line int, message string) {
}
func (el *mockErrorLogger) ErrorAtToken(t token.Token, message string) {
}
func (el *mockErrorLogger) RuntimeError(message string) {
}
func NewMockErrorLogger() *mockErrorLogger {
return &mockErrorLogger{}
}