code: function oncharincategory(lexer, lookahead, categoryREs) {
    var c = lexer.peek_char(lookahead);
    return categoryREs.find(function(re) {
      // because we're matching a single char...
      re.lastIndex = 0; // make sure we start from the start
      return re.test(c);
    });
  }
docs: is the source sitting on a char matching a specified token category?