benchmarks/scenarios/ember.js
function (ch) {
      // DEBUG "Processing `" + ch + "`:"
      var nextStates = this.nextStates,
          child,
          charSpec,
          chars;

      // DEBUG "  " + debugState(this)
      var returned = [];

      for (var i = 0, l = nextStates.length; i < l; i++) {
        child = nextStates[i];

        charSpec = child.charSpec;

        if (typeof (chars = charSpec.validChars) !== 'undefined') {
          if (chars.indexOf(ch) !== -1) {
            returned.push(child);
          }
        } else if (typeof (chars = charSpec.invalidChars) !== 'undefined') {
          if (chars.indexOf(ch) === -1) {
            returned.push(child);
          }
        }
      }

      return returned;
    }
function (ch) {
      // DEBUG "Processing `" + ch + "`:"
      var nextStates = this.nextStates,
          child,
          charSpec,
          chars;

      // DEBUG "  " + debugState(this)
      var returned = [];

      for (var i = 0, l = nextStates.length; i < l; i++) {
        child = nextStates[i];

        charSpec = child.charSpec;

        if (typeof (chars = charSpec.validChars) !== 'undefined') {
          if (chars.indexOf(ch) !== -1) {
            returned.push(child);
          }
        } else if (typeof (chars = charSpec.invalidChars) !== 'undefined') {
          if (chars.indexOf(ch) === -1) {
            returned.push(child);
          }
        }
      }

      return returned;
    }
function ( ch ) { // DEBUG "Processing `" + ch + "`:" var nextStates = this . nextStates , child , charSpec , chars ; // DEBUG "  " + debugState(this) var returned = [ ] ; for ( var i = 0 , l = nextStates . length ; i < l ; i ++ ) { child = nextStates [ i ] ; charSpec = child . charSpec ; if ( typeof ( chars = charSpec . validChars ) !== 'undefined' ) { if ( chars . indexOf ( ch ) !== - 1 ) { returned . push ( child ) ; } } else if ( typeof ( chars = charSpec . invalidChars ) !== 'undefined' ) { if ( chars . indexOf ( ch ) === - 1 ) { returned . push ( child ) ; } } } return returned ; }
Find a list of child states matching the next character
Find a list of child states matching the next character