Number literal strings returned by the lexer (internal/syntax package) and other
arguments to SetString never contain leading whitespace. There's no need (anymore)
to trim the argument.
Change-Id: Ib060d109f46f79a364a5c8aa33c4f625fe849264
Reviewed-on: https://go-review.googlesource.com/c/go/+/203997
Reviewed-by: Robert Griesemer <gri@golang.org>
}
func (a *Mpflt) SetString(as string) {
- // TODO(gri) why is this needed?
- for len(as) > 0 && (as[0] == ' ' || as[0] == '\t') {
- as = as[1:]
- }
-
f, _, err := a.Val.Parse(as, 0)
if err != nil {
yyerror("malformed constant: %s (%v)", as, err)