nl_tokens: Parse logical expressions ( AND / OR )
pl_tokens: function ( ) { var leftNode = this . parseConditionExpression ( ) ; while ( this . currentToken . type == 'logic' ) { var logic = this . currentToken . value ; this . readNextToken ( ) ; var rightNode = this . parseConditionExpression ( ) ; // If we are chaining the same logical operator, add nodes to existing object instead of creating another one if ( typeof leftNode . logic != 'undefined' && leftNode . logic == logic && typeof leftNode . terms != 'undefined' ) leftNode . terms . push ( rightNode ) ; else { var terms = [ leftNode , rightNode ] ; leftNode = { 'logic' : logic , 'terms' : terms . <mask> ( 0 ) } ; } } return leftNode ; }