MCPcopy Index your code
hub / github.com/reactjs/react-rails / filterTokenLocation

Function filterTokenLocation

lib/assets/javascripts/JSXTransformer.js:9734–9759  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9732 }
9733
9734 function filterTokenLocation() {
9735 var i, entry, token, tokens = [];
9736
9737 for (i = 0; i < extra.tokens.length; ++i) {
9738 entry = extra.tokens[i];
9739 token = {
9740 type: entry.type,
9741 value: entry.value
9742 };
9743 if (entry.regex) {
9744 token.regex = {
9745 pattern: entry.regex.pattern,
9746 flags: entry.regex.flags
9747 };
9748 }
9749 if (extra.range) {
9750 token.range = entry.range;
9751 }
9752 if (extra.loc) {
9753 token.loc = entry.loc;
9754 }
9755 tokens.push(token);
9756 }
9757
9758 extra.tokens = tokens;
9759 }
9760
9761 function patch() {
9762 if (typeof extra.tokens !== 'undefined') {

Callers 2

tokenizeFunction · 0.85
parseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected