%q replaced by %s in some error messages
This commit is contained in:
@@ -28,7 +28,7 @@ func (tk *Token) DevString() string {
|
||||
func (tk *Token) String() string {
|
||||
if tk.Value != nil {
|
||||
if s, ok := tk.Value.(string); ok {
|
||||
return fmt.Sprintf("%q", s)
|
||||
return s //fmt.Sprintf("%q", s)
|
||||
} else {
|
||||
return fmt.Sprintf("%v", tk.Value)
|
||||
}
|
||||
@@ -91,11 +91,11 @@ func (tk *Token) Errors(msg string) (err error) {
|
||||
}
|
||||
|
||||
func (tk *Token) ErrorExpectedGot(symbol string) (err error) {
|
||||
err = fmt.Errorf("[%d:%d] expected %q, got %q", tk.row, tk.col, symbol, tk)
|
||||
err = fmt.Errorf("[%d:%d] expected `%s`, got `%s`", tk.row, tk.col, symbol, tk)
|
||||
return
|
||||
}
|
||||
|
||||
func (tk *Token) ErrorExpectedGotString(symbol, got string) (err error) {
|
||||
err = fmt.Errorf("[%d:%d] expected %q, got %q", tk.row, tk.col, symbol, got)
|
||||
err = fmt.Errorf("[%d:%d] expected `%s`, got `%s`", tk.row, tk.col, symbol, got)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user