It errors now.
Chris Pressey
6 years ago
196 | 196 | """ |
197 | 197 | |
198 | 198 | PREFIXES = [ |
199 | u'==> ', | |
200 | u'??> ', | |
199 | 201 | u'| ', |
200 | 202 | u'+ ', |
201 | 203 | u'? ', |
293 | 295 | line_num=self.line_num, filename=self.filename, lines=lines |
294 | 296 | ) |
295 | 297 | |
298 | def reconstruct(pattern, except_prefixes): | |
299 | new_pattern = [] | |
300 | lines = [] | |
301 | for (candidate_prefix, candidate_lines) in pattern: | |
302 | if candidate_prefix in except_prefixes: | |
303 | new_pattern.append((candidate_prefix, candidate_lines)) | |
304 | else: | |
305 | lines.extend([candidate_prefix + line for line in candidate_lines]) | |
306 | return [(u'', lines)] + new_pattern | |
307 | ||
296 | 308 | if '' in pattern_prefixes: |
297 | 309 | # There is plain, non-prefixed text embedded somewhere in this Block. |
298 | # TODO: interpret this according to the new, not-yet-written rules. | |
299 | # For now, assume it is Just Indented Text And That Is OK. | |
300 | return None | |
310 | # We interpret this according to the new, not-yet-written rules. | |
311 | if pattern_prefixes[-1] in [[u'==> ', u'??> ']]: | |
312 | pattern = reconstruct(pattern, [u'==> ', u'??> ']) | |
313 | pattern_prefixes = [p[0] for p in pattern] | |
314 | else: | |
315 | # TODO:issue a warning unless cavalier | |
316 | # For now, assume it is Just Indented Text And That Is OK. | |
317 | return None | |
301 | 318 | |
302 | 319 | if pattern_prefixes in [[u'= '], [u'? ']]: |
303 | 320 | raise FalderalSyntaxError( |