lang: Detect windows style CR and return a better error
If you get a sneaky \r in your code, the error just looks like whitespace, so this way we can warn you explicitly.
This commit is contained in:
@@ -46,6 +46,7 @@ const (
|
||||
// These constants represent the different possible lexer/parser errors.
|
||||
const (
|
||||
ErrLexerUnrecognized = interfaces.Error("unrecognized")
|
||||
ErrLexerUnrecognizedCR = interfaces.Error("unrecognized carriage return")
|
||||
ErrLexerStringBadEscaping = interfaces.Error("string: bad escaping")
|
||||
ErrLexerIntegerOverflow = interfaces.Error("integer: overflow")
|
||||
ErrLexerFloatOverflow = interfaces.Error("float: overflow")
|
||||
|
||||
Reference in New Issue
Block a user