From a02326a0a6851080601fd70d7ab7431e2d5f622b Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Tue, 29 Aug 2023 16:19:04 +0000 Subject: [PATCH] lexer: ErrUnacceptableRune and ErrNotImplemented Signed-off-by: Alejandro Mery --- lexer/error.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lexer/error.go b/lexer/error.go index 6ffd479..541c7f8 100644 --- a/lexer/error.go +++ b/lexer/error.go @@ -1,6 +1,7 @@ package lexer import ( + "errors" "fmt" "strings" ) @@ -9,6 +10,14 @@ var ( _ error = (*Error)(nil) ) +var ( + // ErrUnacceptableRune indicates the read rune isn't acceptable in the context + ErrUnacceptableRune = errors.New("rune not acceptable in context") + + // ErrNotImplemented indicates something hasn't been implemented yet + ErrNotImplemented = errors.New("not implemented") +) + // Error represents a generic parsing error type Error struct { Filename string