go-lexer
go-lexer copied to clipboard
err without context of L
when the lexer starts to analyze the source string, if err occurs, L does not provider any interface to expose 'start', 'position' info of source string to bind to the error; the error is printed without this context info, so it is kind of difficult to locate the error in source string.
Sorry for seeing this so late, I think that's a good point. I suppose the solution will be to add that information to the error being thrown so that it can show this information in its message.
I'd be happy to merge a PR with these changes.
@longxueyuu @bbuck If you're interested in my solution I can make a merge request :-)
Sure let me take a look this weekend.