Skip to content

Commit

Permalink
Copy escapeReservedWord implementation from python generator (#20035)
Browse files Browse the repository at this point in the history
  • Loading branch information
andlien authored Nov 7, 2024
1 parent cfef948 commit e2553a4
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,4 +326,12 @@ public void postProcess() {

@Override
public String generatorLanguageVersion() { return "3.7"; }

@Override
public String escapeReservedWord(String name) {
if (this.reservedWordsMappings().containsKey(name)) {
return this.reservedWordsMappings().get(name);
}
return "var_" + name;
}
}

0 comments on commit e2553a4

Please sign in to comment.