(t)
| 1861 | * @returns {Node} the leaf token node |
| 1862 | */ |
| 1863 | const tokenToNode = (t) => { |
| 1864 | const tt = t.type; |
| 1865 | // URL is the only leaf with own state (its content range); all others are a |
| 1866 | // plain leaf whose node type comes from the map. |
| 1867 | if (tt === TT_URL) { |
| 1868 | const ut = /** @type {CssUrlToken} */ (t); |
| 1869 | return _mkUrl(t.start, t.end, ut.contentStart, ut.contentEnd); |
| 1870 | } |
| 1871 | return _mkLeaf(_ttToNodeType[tt], t.start, t.end); |
| 1872 | }; |
| 1873 | |
| 1874 | /** |
| 1875 | * Position-based view over the lexer — webpack's stand-in for the spec's |
no outgoing calls
no test coverage detected