MCPcopy
hub / github.com/PaulTaykalo/objc-dependency-visualizer / isReserved

Function isReserved

Scripts/ace/worker-javascript.js:2549–2571  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

2547 }
2548
2549 function isReserved(token) {
2550 if (!token.reserved) {
2551 return false;
2552 }
2553 var meta = token.meta;
2554
2555 if (meta && meta.isFutureReservedWord && state.option.inES5()) {
2556 if (!meta.es5) {
2557 return false;
2558 }
2559 if (meta.strictOnly) {
2560 if (!state.option.strict && !state.directive["use strict"]) {
2561 return false;
2562 }
2563 }
2564
2565 if (token.isProperty) {
2566 return false;
2567 }
2568 }
2569
2570 return true;
2571 }
2572
2573 function supplant(str, data) {
2574 return str.replace(/\{([^{}]*)\}/g, function(a, b) {

Callers 7

prefixFunction · 0.85
assignopFunction · 0.85
bitwiseassignopFunction · 0.85
suffixFunction · 0.85
optionalidentifierFunction · 0.85
statementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected