Skip to content

Commit

Permalink
fix(generators)!: Make scrub_ public
Browse files Browse the repository at this point in the history
Fixes google#2156.

In PRs google#7602, google#7616, google#7646, google#7647 and google#7654 the @Protected
access modifier on scrub_ on the CodeGenerator subclasses
was not transcribed to the new typescript signature.  I was
going to re-add it, but this breaks some of the procedure
block generator functions which rely on it, and then
@BeksOmega pointed out that this might be one of the
CodeGenerator API functions which we had already decided
should be public—and lo and behold I found google#2156.

Per discussion amongst team, I am not renaming it to
scrub at this time.
  • Loading branch information
cpcallen committed Mar 15, 2024
1 parent e91dd20 commit fe6241e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion core/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ export class CodeGenerator {
* @param _opt_thisOnly True to generate code for only this statement.
* @returns Code with comments and subsequent blocks added.
*/
protected scrub_(
scrub_(
_block: Block,
code: string,
_opt_thisOnly?: boolean,
Expand Down
1 change: 0 additions & 1 deletion generators/javascript/javascript_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ export class JavascriptGenerator extends CodeGenerator {
* @param code The JavaScript code created for this block.
* @param thisOnly True to generate code for only this statement.
* @returns JavaScript code with comments and subsequent blocks added.
* @protected
*/
scrub_(block: Block, code: string, thisOnly = false): string {
let commentCode = '';
Expand Down
1 change: 0 additions & 1 deletion generators/python/python_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ export class PythonGenerator extends CodeGenerator {
* @param code The Python code created for this block.
* @param thisOnly True to generate code for only this statement.
* @returns Python code with comments and subsequent blocks added.
*/
scrub_(block: Block, code: string, thisOnly = false): string {
let commentCode = '';
Expand Down

0 comments on commit fe6241e

Please sign in to comment.