r"""Join lines following explicit line continuations (\)
()
| 173 | |
| 174 | @CoroutineInputTransformer.wrap |
| 175 | def assemble_logical_lines(): |
| 176 | r"""Join lines following explicit line continuations (\)""" |
| 177 | line = '' |
| 178 | while True: |
| 179 | line = (yield line) |
| 180 | if not line or line.isspace(): |
| 181 | continue |
| 182 | |
| 183 | parts = [] |
| 184 | while line is not None: |
| 185 | if line.endswith('\\') and (not has_comment(line)): |
| 186 | parts.append(line[:-1]) |
| 187 | line = (yield None) # Get another line |
| 188 | else: |
| 189 | parts.append(line) |
| 190 | break |
| 191 | |
| 192 | # Output |
| 193 | line = ''.join(parts) |
| 194 | |
| 195 | # Utilities |
| 196 | def _make_help_call(target, esc, lspace, next_input=None): |