修复: byte/rune 长度混淆及错误位置丢失
This commit is contained in:
3
error.go
3
error.go
@@ -14,11 +14,10 @@ func (p Position) String() string {
|
||||
type ParseError struct {
|
||||
Message string
|
||||
Pos Position
|
||||
Token string
|
||||
}
|
||||
|
||||
func (e ParseError) Error() string {
|
||||
return fmt.Sprintf("%s: %s (token: %q)", e.Pos, e.Message, e.Token)
|
||||
return fmt.Sprintf("%s: %s", e.Pos, e.Message)
|
||||
}
|
||||
|
||||
type ExecError struct {
|
||||
|
||||
Reference in New Issue
Block a user