lexer.js
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);
  });
}
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);
  });
}
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 ) ; } ) ; }
is the source sitting on a char matching a specified token category?
is the source sitting on a char matching a specified token category?