formulaParser.js
function _parseUnarySubformula(self, currentString) {
  const unary = matchOperator(currentString, self.unaries);
  if (!unary) {
    return null;
  }

  const parsedSubformula = _parseFormula(self, sliceSymbol(currentString, unary.symbol), unary.precedence);

  return {
    json: { [unary.key]: parsedSubformula.json },
    remainder: parsedSubformula.remainder
  };
}
function _parseUnarySubformula(self, currentString) {
  const unary = matchOperator(currentString, self.unaries);
  if (!unary) {
    return null;
  }

  const parsedSubformula = _parseFormula(self, sliceSymbol(currentString, unary.symbol), unary.precedence);

  return {
    json: { [unary.key]: parsedSubformula.json },
    remainder: parsedSubformula.remainder
  };
}
function _parseUnarySubformula ( self , currentString ) { const unary = matchOperator ( currentString , self . unaries ) ; if ( ! unary ) { return null ; } const parsedSubformula = _parseFormula ( self , sliceSymbol ( currentString , unary . symbol ) , unary . precedence ) ; return { json : { [ unary . key ] : parsedSubformula . json } , remainder : parsedSubformula . remainder } ; }
Attempts to parse a unary subformula at the head of a given string.
Returns an AST node and string remainder if successful, otherwise null.

@private
@param {FormulaParser} self
@param {string}        currentString - remainder of input string left to parse
@returns {?Object}
Attempts to parse a unary subformula at the head of a given string . Returns an AST node and string remainder if successful otherwise null .