-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d544f3e
commit 1a644ec
Showing
2 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -558,11 +558,20 @@ def say_get_code(ast, inmenu=False): | |
if not ast.interact and not inmenu: | ||
rv.append("nointeract") | ||
|
||
if ast.with_: | ||
rv.append("with") | ||
rv.append(ast.with_) | ||
# explicit_identifier was only added in 7.7/8.2. | ||
if hasattr(ast, "explicit_identifier") and ast.explicit_identifier: | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
CensoredUsername
Author
Owner
|
||
rv.append("id") | ||
rv.append(ast.identifier) | ||
# identifier was added in 7.4.1. But the way ren'py processed it | ||
# means it doesn't stored it in the pickle unless explicitly set | ||
elif hasattr(ast, "identifier") and ast.identifier is not None: | ||
This comment has been minimized.
Sorry, something went wrong. |
||
rv.append(ast.identifier) | ||
|
||
if hasattr(ast, 'arguments') and ast.arguments is not None: | ||
This comment has been minimized.
Sorry, something went wrong.
Gouvernathor
Contributor
|
||
rv.append(reconstruct_arginfo(ast.arguments)) | ||
|
||
if ast.with_: | ||
rv.append("with") | ||
rv.append(ast.with_) | ||
|
||
return " ".join(rv) |
Can be simplified with
getattr(ast, "explicit_identifier")