(P: ParseState)
| 1859 | } |
| 1860 | |
| 1861 | function parseProcessSub(P: ParseState): TsNode | null { |
| 1862 | const c = peek(P.L) |
| 1863 | if ((c !== '<' && c !== '>') || peek(P.L, 1) !== '(') return null |
| 1864 | const start = P.L.b |
| 1865 | advance(P.L) |
| 1866 | advance(P.L) |
| 1867 | const open = mk(P, c + '(', start, P.L.b, []) |
| 1868 | const body = parseStatements(P, ')') |
| 1869 | skipBlanks(P.L) |
| 1870 | let close: TsNode |
| 1871 | if (peek(P.L) === ')') { |
| 1872 | const cs = P.L.b |
| 1873 | advance(P.L) |
| 1874 | close = mk(P, ')', cs, P.L.b, []) |
| 1875 | } else { |
| 1876 | close = mk(P, ')', P.L.b, P.L.b, []) |
| 1877 | } |
| 1878 | return mk(P, 'process_substitution', start, close.endIndex, [ |
| 1879 | open, |
| 1880 | ...body, |
| 1881 | close, |
| 1882 | ]) |
| 1883 | } |
| 1884 | |
| 1885 | function scanHeredocBodies(P: ParseState): void { |
| 1886 | // Skip to newline if not already there |
no test coverage detected