function updateExpression() {
  // Default highlighter will not highlight anything
  var nullHighlighter = function(item) { return false; }

  var input = $('.expression');
  var expression = input.val();

  var highlighter;

  if (!expression) {
    // No expression specified. Don't highlight anything.
    highlighter = nullHighlighter;
    input.css('background-color', '#fff');
  } else {
    try {
      // Build highlighter from user's expression
      highlighter = compileExpression(expression); // <-- Filtrex!
      input.css('background-color', '#dfd');
    } catch (e) {
      // Failed to parse expression. Don't highlight anything.
      highlighter = nullHighlighter;
      input.css('background-color', '#fdd');
    }
  }

  highlightRows(highlighter);
}
/**
 * When user entered expression changes, attempt to parse it
 * and apply highlights to rows that match filter.
 */
When user entered expression changes, attempt to parse it
and apply highlights to rows that match filter.
When user entered expression changes attempt to parse it and apply highlights to rows that match filter .
function updateExpression() {
  var nullHighlighter = function(item) { return false; }
  var input = $('.expression');
  var expression = input.val();
  var highlighter;
  if (!expression) {
    highlighter = nullHighlighter;
    input.css('background-color', '#fff');
  } else {
    try {
      highlighter = compileExpression(expression); 
      input.css('background-color', '#dfd');
    } catch (e) {
      highlighter = nullHighlighter;
      input.css('background-color', '#fdd');
    }
  }
  highlightRows(highlighter);
}
function updateExpression ( ) { var nullHighlighter = function ( item ) { return false ; } var input = $ ( '.expression' ) ; var expression = input . val ( ) ; var highlighter ; if ( ! expression ) { highlighter = nullHighlighter ; input . css ( 'background-color' , '#fff' ) ; } else { try { highlighter = compileExpression ( expression ) ; input . css ( 'background-color' , '#dfd' ) ; } catch ( e ) { highlighter = nullHighlighter ; input . css ( 'background-color' , '#fdd' ) ; } } highlightRows ( highlighter ) ; }
When user entered expression changes, attempt to parse it
 and apply highlights to rows that match filter.
When user entered expression changes attempt to parse it and apply highlights to rows that match filter .
// Default highlighter will not highlight anything // No expression specified. Don't highlight anything. // Build highlighter from user's expression // <-- Filtrex! // Failed to parse expression. Don't highlight anything.