decoder [WIP]

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-09-01 22:43:36 +00:00
parent 754642e98f
commit da009aae4f
3 changed files with 106 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package ini
import (
"log"
"asciigoat.org/core/lexer"
)
func (*Decoder[T]) parserOnError(pos lexer.Position, content string, err error) error {
log.Printf("%s: %s %s: %q: %v", "ini", pos, "error:", content, err)
return &lexer.Error{
Line: pos.Line,
Column: pos.Column,
Content: content,
Err: err,
}
}