diff options
Diffstat (limited to 'state.go')
-rw-r--r-- | state.go | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -16,9 +16,8 @@ type State struct { // Error is a secondary return channel from parsers, but used so heavily // in backtracking that it has been inlined to avoid allocations. Error Error - // Called to determine what to ignore when WS is called, or when AutoWS fires - WS VoidParser - NoAutoWS bool + // Called to determine what to ignore when WS is called, or when WS fires + WS VoidParser } // ASCIIWhitespace matches any of the standard whitespace characters. It is faster @@ -60,14 +59,6 @@ func (s *State) Advance(i int) { s.Pos += i } -// AutoWS consumes all whitespace and advances Pos but can be disabled by the NoAutWS() parser. -func (s *State) AutoWS() { - if s.NoAutoWS { - return - } - s.WS(s) -} - // Get the remaining input. func (s *State) Get() string { if s.Pos > len(s.Input) { |