code: func (p *Parser) parseCaret() (Revisioner, error) {
  	var tok token
  	var lit string
  	var err error
  
  	tok, lit, err = p.scan()
  
  	if err != nil {
  		return nil, err
  	}
  
  	switch {
  	case tok == obrace:
  		r, err := p.parseCaretBraces()
  
  		if err != nil {
  			return nil, err
  		}
  
  		return r, nil
  	case tok == number:
  		n, _ := strconv.Atoi(lit)
  
  		if n > 2 {
  			return nil, &ErrInvalidRevision{fmt.Sprintf(`"%s" found must be 0, 1 or 2 after "^"`, lit)}
  		}
  
  		return CaretPath{n}, nil
  	default:
  		p.unscan()
  		return CaretPath{1}, nil
  	}
  }
docs: // parseCaret extract ^ statements