code: func (p *parser) eol() Error {
  	// are we at the end of the line?
  	_token, _err := p.next()
  	if _err != nil {
  		return _err
  	}
  
  	// have we encountered whitespace only?
  	switch _token.Type {
  	// if we're at the end of the line or file, we're done
  	case EOL:
  		fallthrough
  	case EOF:
  		p.undo(_token)
  		return nil
  	}
  
  	// otherwise, we have an invalid pattern
  	p.undo(_token)
  	return p.err(InvalidPatternError)
  }
docs: // eol attempts to consume the next Lexer token to read the end of line or end
  // of file. If a EOL or EOF is not reached , eol will return an error.