code: function markBrackets(tokens) {
    let tokensLength = tokens.length;
    let ps = []; // Parentheses
    let sbs = []; // Square brackets
    let cbs = []; // Curly brackets
    let t; // Current token
  
    // For every token in the token list, if we meet an opening (left)
    // bracket, push its index number to a corresponding array.
    // If we then meet a closing (right) bracket, look at the corresponding
    // array. If there are any elements (records about previously met
    // left brackets), take a token of the last left bracket (take
    // the last index number from the array and find a token with
    // this index number) and save right bracket's index as a reference:
    for (var i = 0; i < tokensLength; i++) {
      t = tokens[i];
      var type = t.type;
  
      if (type === TokenType.LeftParenthesis) {
        ps.push(i);
      } else if (type === TokenType.RightParenthesis) {
        if (ps.length) {
          t.left = ps.pop();
          tokens[t.left].right = i;
        }
      } else if (type === TokenType.LeftSquareBracket) {
        sbs.push(i);
      } else if (type === TokenType.RightSquareBracket) {
        if (sbs.length) {
          t.left = sbs.pop();
          tokens[t.left].right = i;
        }
      } else if (type === TokenType.LeftCurlyBracket) {
        cbs.push(i);
      } else if (type === TokenType.RightCurlyBracket) {
        if (cbs.length) {
          t.left = cbs.pop();
          tokens[t.left].right = i;
        }
      }
    }
  }
docs: Pair brackets
  @param {Array} tokens