diff options
author | Adam Scarr <adam@vektah.net> | 2017-08-13 19:27:41 +1000 |
---|---|---|
committer | Adam Scarr <adam@vektah.net> | 2017-08-13 19:27:41 +1000 |
commit | a4677a5834210c85e050de6dad13911a85297499 (patch) | |
tree | 0e0802a75478a10b4765fced5eb8c5ddd92183cc /literals.go | |
parent | 5716ddb5e7ca3cb4ee445bdd4958c37aeb033baa (diff) |
Clean up autows
Diffstat (limited to 'literals.go')
-rw-r--r-- | literals.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/literals.go b/literals.go index 1287001..00e39f9 100644 --- a/literals.go +++ b/literals.go @@ -12,7 +12,7 @@ import ( // - unicode sequences, eg \uBEEF func StringLit(allowedQuotes string) Parser { return NewParser("string literal", func(ps *State, node *Result) { - ps.AutoWS() + ps.WS(ps) if !stringContainsByte(allowedQuotes, ps.Input[ps.Pos]) { ps.ErrorHere(allowedQuotes) @@ -89,7 +89,7 @@ func StringLit(allowedQuotes string) Parser { // NumberLit matches a floating point or integer number and returns it as a int64 or float64 in .Result func NumberLit() Parser { return NewParser("number literal", func(ps *State, node *Result) { - ps.AutoWS() + ps.WS(ps) end := ps.Pos float := false inputLen := len(ps.Input) |