mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 12:51:10 +00:00
Update codegen.rs
This commit is contained in:
parent
8dcc44b9cb
commit
ce5f551bc7
1 changed files with 2 additions and 2 deletions
|
@ -230,8 +230,8 @@ fn convert_to_python_name(name: Str) -> Str {
|
||||||
fn escape_name(ident: Identifier) -> Str {
|
fn escape_name(ident: Identifier) -> Str {
|
||||||
let vis = ident.vis();
|
let vis = ident.vis();
|
||||||
let mut name = convert_to_python_name(ident.name.into_token().content).to_string();
|
let mut name = convert_to_python_name(ident.name.into_token().content).to_string();
|
||||||
name = name.replace('!', "__erg_proc");
|
name = name.replace('!', "__erg_proc__");
|
||||||
name = name.replace('$', "__erg_shared");
|
name = name.replace('$', "__erg_shared__");
|
||||||
if vis.is_public() || is_python_global(&name) {
|
if vis.is_public() || is_python_global(&name) {
|
||||||
Str::from(name)
|
Str::from(name)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue