code: func (p *Parser) parseFilter(cur *ListNode) error {
  	p.pos += len("[?(")
  	p.consumeText()
  Loop:
  	for {
  		switch p.next() {
  		case eof, '\n':
  			return fmt.Errorf("unterminated filter")
  		case ')':
  			break Loop
  		}
  	}
  	if p.next() != ']' {
  		return fmt.Errorf("unclosed array expect ]")
  	}
  	reg := regexp.MustCompile(`^([^!<>=]+)([!<>=]+)(.+?)$`)
  	text := p.consumeText()
  	text = string(text[:len(text)-2])
  	value := reg.FindStringSubmatch(text)
  	if value == nil {
  		parser, err := parseAction("text", text)
  		if err != nil {
  			return err
  		}
  		cur.append(newFilter(parser.Root, newList(), "exists"))
  	} else {
  		leftParser, err := parseAction("left", value[1])
  		if err != nil {
  			return err
  		}
  		rightParser, err := parseAction("right", value[3])
  		if err != nil {
  			return err
  		}
  		cur.append(newFilter(leftParser.Root, rightParser.Root, value[2]))
  	}
  	return p.parseInsideAction(cur)
  }
docs: // parseFilter scans filter inside array selection