src/abstract-syntax-tree.js
function processParentheses(tokenizer, scope) {
  if (tokenizer.token.match(types.CLOSE_PARENTHESES)) {
    throw new SyntaxError('Unexpected end of expression');
  }

  if (tokenizer.token.match(types.OPEN_PARENTHESES)) {
    const node = processLogicalOr(tokenizer.skipToken(), scope);

    if (!tokenizer.token.match(types.CLOSE_PARENTHESES)) {
      throw new SyntaxError('Unexpected end of expression');
    }

    tokenizer.skipToken();
    return node;
  }

  throw new SyntaxError('Unexpected end of expression');
}
function processParentheses(tokenizer, scope) {
  if (tokenizer.token.match(types.CLOSE_PARENTHESES)) {
    throw new SyntaxError('Unexpected end of expression');
  }

  if (tokenizer.token.match(types.OPEN_PARENTHESES)) {
    const node = processLogicalOr(tokenizer.skipToken(), scope);

    if (!tokenizer.token.match(types.CLOSE_PARENTHESES)) {
      throw new SyntaxError('Unexpected end of expression');
    }

    tokenizer.skipToken();
    return node;
  }

  throw new SyntaxError('Unexpected end of expression');
}
function processParentheses ( tokenizer , scope ) { if ( tokenizer . token . match ( types . CLOSE_PARENTHESES ) ) { throw new SyntaxError ( 'Unexpected end of expression' ) ; } if ( tokenizer . token . match ( types . OPEN_PARENTHESES ) ) { const node = processLogicalOr ( tokenizer . skipToken ( ) , scope ) ; if ( ! tokenizer . token . match ( types . CLOSE_PARENTHESES ) ) { throw new SyntaxError ( 'Unexpected end of expression' ) ; } tokenizer . skipToken ( ) ; return node ; } throw new SyntaxError ( 'Unexpected end of expression' ) ; }
Process parentheses expressions
@return {Function} compiled node
@private
Process parentheses expressions