CensoredUsername / unrpyc

A ren'py script decompiler
Other
864 stars 157 forks source link

[REGRESSION] Required parentheses are missing in SL1 #28

Closed jackmcbarn closed 9 years ago

jackmcbarn commented 9 years ago

As a result of f983608c, the following code decompiles incorrectly in SL1:

screen testScreen:
    modal False
    vbox:
        text ('Some variable is %s' % someVar)

This is the result of decompiling it:

screen testScreen:
    modal False
    vbox:
        text 'Some variable is %s' % someVar

The decompiled output isn't valid: "expected a keyword argument, colon, or end of line."

    text 'Some variable is %s' % someVar
                               ^
CensoredUsername commented 9 years ago

Strange, this didn't happen in the tests I ran with it. What version are you using to test this? It might be that simple_expression parsing changed. As far as I know it works fine in 6.17.

jackmcbarn commented 9 years ago

6.15.7.374

CensoredUsername commented 9 years ago

Ah. It seems this change dates back to a change in ren'py, 17 Jan 2014 in which operators became supported in simple_expressions. I will change the code so it will add parenthesis around the affected equations too.

CensoredUsername commented 9 years ago

Should be fixed by 8ed7bd0c102140cdd1e3af7b7a3d287b7acf4c7d