code: function parseNameVal(cmd) {
      // This is kind of tricky because we need to support the old
      // variant:   KEY name value
      // as well as the new one:    KEY name=value ...
      // The trigger to know which one is being used will be whether we hit
      // a space or = first.  space ==> old, "=" ==> new
      var word;
      var words = parseWords(cmd.rest);
  
      cmd.args = {};
  
      if (words.length === 0) {
          cmd.error = 'No KEY name value, or KEY name=value arguments found';
          return false;
      }
  
      if (words[0].indexOf('=') == -1) {
          // Old format (KEY name value)
          var strs = cmd.rest.split(TOKEN_WHITESPACE);
          if (strs.length < 2) {
              cmd.error = cmd.name + ' must have two arguments, got ' + cmd.rest;
              return false;
          }
  
          // Convert to new style key:value map.
          cmd.args[strs[0]] = strs.slice(1).join(' ');
  
      } else {
          // New format (KEY name=value ...)
          var i;
          for (i = 0; i < words.length; i++) {
              word = words[i];
              if (word.indexOf('=') == -1) {
                  cmd.error = 'Syntax error - can\'t find = in ' + word + '. Must be of the form: name=value';
                  return false;
              }
              var parts = word.split('=');
              cmd.args[parts[0]] = parts.slice(1).join('=');
          }
      }
  
      return true;
  }
docs: Parse environment like statements. Note that this does *not* handle variable interpolation, which will be handled in the evaluator.