From b09a14147d397904722ee7c25e4defc56135b96f Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 9 May 2022 00:01:02 +0200 Subject: Extract source walk part of scanner --- pkg/libs/source/errors.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 pkg/libs/source/errors.go (limited to 'pkg/libs/source/errors.go') diff --git a/pkg/libs/source/errors.go b/pkg/libs/source/errors.go new file mode 100644 index 0000000..cfcd9e3 --- /dev/null +++ b/pkg/libs/source/errors.go @@ -0,0 +1,10 @@ +package source + +type ErrUnexpectedChar struct { + Expected rune + Actual rune +} + +func (e ErrUnexpectedChar) Error() string { + return "unexpected character: expected " + string(e.Expected) + ", actual " + string(e.Actual) +} -- cgit 1.4.1