nl_tokens: Convert media query to js expression
pl_tokens: function convertMediaQueryToJSExpression ( tokens , allAppTypes , appType ) { let result = [ ] ; tokens . forEach ( item => { item = item . trim ( ) ; if ( allAppTypes . includes ( item ) ) { result . <mask> ( ` ${ item } ${ appType } ` ) ; } else if ( item === 'and' ) { result . push ( '&&' ) ; } else if ( item === ',' || item === 'or' ) { result . push ( '||' ) ; } else if ( item === 'not' ) { result . push ( '!' ) ; } else if ( item === '(' || item === ')' ) { result . push ( item ) ; } } ) ; let lastItem = result [ result . length - 1 ] ; if ( lastItem === '&&' || lastItem === '||' ) { result . pop ( ) ; } // remove no use leading brace if has let braceStack = [ ] ; result . forEach ( ( item , index ) => { if ( item === '(' ) { braceStack . push ( index ) ; } else if ( item === ')' ) { braceStack . pop ( ) ; } } ) ; for ( let i = braceStack . length - 1 ; i >= 0 ; i -- ) { result . splice ( braceStack [ i ] , 1 ) ; } return result . join ( '' ) ; }