(token, isProperty)
| 15309 | |
| 15310 | |
| 15311 | function isReserved(token, isProperty) { |
| 15312 | if (!token.reserved) { |
| 15313 | return false; |
| 15314 | } |
| 15315 | var meta = token.meta; |
| 15316 | |
| 15317 | if (meta && meta.isFutureReservedWord && state.inES5()) { |
| 15318 | // ES3 FutureReservedWord in an ES5 environment. |
| 15319 | if (!meta.es5) { |
| 15320 | return false; |
| 15321 | } |
| 15322 | |
| 15323 | // Some ES5 FutureReservedWord identifiers are active only |
| 15324 | // within a strict mode environment. |
| 15325 | if (meta.strictOnly) { |
| 15326 | if (!state.option.strict && !state.isStrict()) { |
| 15327 | return false; |
| 15328 | } |
| 15329 | } |
| 15330 | |
| 15331 | if (isProperty) { |
| 15332 | return false; |
| 15333 | } |
| 15334 | } |
| 15335 | |
| 15336 | return true; |
| 15337 | } |
| 15338 | |
| 15339 | // Produce a token object. |
| 15340 | var create = function(type, value, isProperty, token) { |
no outgoing calls
no test coverage detected