File: /home/frenchy/www/french-american.org/current/node_modules/uglyfly-js/lib/precedence.js
/***********************************************************************
Copyright 2014 (c) Saair Quaderi <saair.quaderi@gmail.com>
Copyright 2012-2013 (c) Mihai Bazon <mihai.bazon@gmail.com>
UglyflyJS sourcecode can be found here:
https://github.com/quaderi/uglyflyjs
UglyflyJS (by Saair) is a fork of UglifyJS2 (by Mihai Bazon)
Both libraries are released under the BSD 2-Clause License.
***********************************************************************/
/*globals define, module, require */
((typeof define === "function") ? define :
function () { "use strict"; require('./nd').apply(module, arguments); })(
"precedence",
[
//no dependencies
],
function () {
"use strict";
function precedence(op) {
switch (op) {
case "||":
return 1;
case "&&":
return 2;
case "|":
return 3;
case "^":
return 4;
case "&":
return 5;
case "==":
case "===":
case "!=":
case "!==":
return 6;
case "<":
case ">":
case "<=":
case ">=":
case "in":
case "instanceof":
return 7;
case ">>":
case "<<":
case ">>>":
return 8;
case "+":
case "-":
return 9;
case "*":
case "/":
case "%":
return 10;
default:
return null;
}
}
return precedence;
}
);