I am getting this error while the less files are getting compiled, lesshat is a less mixin library (using version 1.1.1) and the AEM less compiler is throwing this error.
lesshat contains statements like this, which make use of javascript in less files.
@processing: `(function(){ var arg = "@{arguments}".replace("[","").replace("]","") || "none"; if( !/^\w*([ X])/.test(arg) ) { arg = arg.replace(/,/g,"") } return arg; })()`;