From bb7a59b85c50c71a96ef29bde52fa6d0c9ebea00 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 29 Sep 2006 03:50:34 +0000 Subject: [PATCH] We now text and insert some needed line continuations. --- ctopy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctopy b/ctopy index 65b9997..98db347 100755 --- a/ctopy +++ b/ctopy @@ -20,7 +20,6 @@ Limitations: a loop variable, but not the more complex ones. * Doesn't even attempt to translate switch/case or do/while. * Doesn't attempt to translate ternary operator. - * Won't put Python line continuations in multiline conditionals. * C comma expressions will spuriously turn into Python tuuple constructors, * We don't translate frexp and modf because their call conventions differ between Python and C, so we want them to throw an error. @@ -87,6 +86,7 @@ unsafe_transformations = ( (r" *\|\| *", r" or "), (r"-\>", "."), (r"!(?!=) *", "not "), + (r"(and|or) *\n", r"\1 \\\n"), # increment and decrement statements (r"(%(id)s)\+\+([;\n])", r"\1 += 1\2"), (r"(%(id)s)--([;\n])", r"\1 -= 1\2"), -- 2.43.0