Summary
JsxText — the text content of a JSX element, hi in
<span>hi</span> — is in no arm of the JavaScript, MozJS or TSX
getters, so it reaches neither n1 nor n2. Found while reviewing
#1395, which fixed the operator sibling of this gap (</ and />).
Evidence
rg -n 'JsxText' big-code-analysis-ast/src/getter/ returns nothing.
bca ops --no-config on <div><span>hi</span></div> in a .jsx,
.js or .tsx file lists div and span as operands and no hi.
TypeScript's enum carries JsxText (163) but no JSX element kinds, so
it is unaffected.
Decision needed
Operand seems right — it is a literal, like a string's contents — but
check grammar-dispatch §5 first: confirm jsx_text is childless and
that no containing node is classified, and check how whitespace-only
jsx_text nodes (the newlines between tags in a multi-line element)
should score, since billing each as an operand would inflate N2 by
the source's formatting. No JSX exists in any corpus, so unit fixtures
only.
Related
Summary
JsxText— the text content of a JSX element,hiin<span>hi</span>— is in no arm of the JavaScript, MozJS or TSXgetters, so it reaches neither
n1norn2. Found while reviewing#1395, which fixed the operator sibling of this gap (
</and/>).Evidence
rg -n 'JsxText' big-code-analysis-ast/src/getter/returns nothing.bca ops --no-configon<div><span>hi</span></div>in a.jsx,.jsor.tsxfile listsdivandspanas operands and nohi.TypeScript's enum carries
JsxText(163) but no JSX element kinds, soit is unaffected.
Decision needed
Operand seems right — it is a literal, like a string's contents — but
check grammar-dispatch §5 first: confirm
jsx_textis childless andthat no containing node is classified, and check how whitespace-only
jsx_textnodes (the newlines between tags in a multi-line element)should score, since billing each as an operand would inflate
N2bythe source's formatting. No JSX exists in any corpus, so unit fixtures
only.
Related