function _parseVariable(self, currentString) {
  const variable = (currentString.match(/^\w+/) || [])[0];
  if (!variable) {
    return null;
  }

  return {
    json: { [self.variableKey]: variable },
    remainder: sliceSymbol(currentString, variable)
  };
}
/**
 * Attempts to parse a variable (i.e., any alphanumeric substring) 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 variable  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 variable 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 }
function _parseVariable(self, currentString) {
  const variable = (currentString.match(/^\w+/) || [])[0];
  if (!variable) {
    return null;
  }
  return {
    json: { [self.variableKey]: variable },
    remainder: sliceSymbol(currentString, variable)
  };
}
function _parseVariable ( self , currentString ) { const variable = ( currentString . match ( / ^\w+ / ) || [ ] ) [ 0 ] ; if ( ! variable ) { return null ; } return { json : { [ self . variableKey ] : variable } , remainder : sliceSymbol ( currentString , variable ) } ; }
Attempts to parse a variable (i.e., any alphanumeric substring) at the head of a given string.
Attempts to parse a variable ( i . e . any alphanumeric substring ) at the head of a given string .