Skip to content

Commit

Permalink
fix(generators)!: Make scrub_ protected again
Browse files Browse the repository at this point in the history
In PRs google#7602, google#7616, google#7646, google#7647 and google#7654 the @Protected
access modifier on scrub_ was not transcribed to the new
typescript signature.

BREAKING CHANGE: This makes scrub_ protected again, which will
break any code attempting to access this method from outside
a CodeGenerator subclass.
  • Loading branch information
cpcallen committed Mar 15, 2024
1 parent e91dd20 commit 1dadacf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion generators/dart/dart_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class DartGenerator extends CodeGenerator {
* @param thisOnly True to generate code for only this statement.
* @returns Dart code with comments and subsequent blocks added.
*/
scrub_(block: Block, code: string, thisOnly = false): string {
protected scrub_(block: Block, code: string, thisOnly = false): string {
let commentCode = '';
// Only collect comments for blocks that aren't inline.
if (!block.outputConnection || !block.outputConnection.targetConnection) {
Expand Down
3 changes: 1 addition & 2 deletions generators/javascript/javascript_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,8 @@ 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 {
protected scrub_(block: Block, code: string, thisOnly = false): string {
let commentCode = '';
// Only collect comments for blocks that aren't inline.
if (!block.outputConnection || !block.outputConnection.targetConnection) {
Expand Down
2 changes: 1 addition & 1 deletion generators/lua/lua_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class LuaGenerator extends CodeGenerator {
* @param thisOnly True to generate code for only this statement.
* @returns Lua code with comments and subsequent blocks added.
*/
scrub_(block: Block, code: string, thisOnly = false): string {
protected scrub_(block: Block, code: string, thisOnly = false): string {
let commentCode = '';
// Only collect comments for blocks that aren't inline.
if (!block.outputConnection || !block.outputConnection.targetConnection) {
Expand Down
2 changes: 1 addition & 1 deletion generators/php/php_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class PhpGenerator extends CodeGenerator {
* @param thisOnly True to generate code for only this statement.
* @returns PHP code with comments and subsequent blocks added.
*/
scrub_(block: Block, code: string, thisOnly = false): string {
protected scrub_(block: Block, code: string, thisOnly = false): string {
let commentCode = '';
// Only collect comments for blocks that aren't inline.
if (!block.outputConnection || !block.outputConnection.targetConnection) {
Expand Down
3 changes: 1 addition & 2 deletions generators/python/python_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,8 @@ 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 {
protected scrub_(block: Block, code: string, thisOnly = false): string {
let commentCode = '';
// Only collect comments for blocks that aren't inline.
if (!block.outputConnection || !block.outputConnection.targetConnection) {
Expand Down

0 comments on commit 1dadacf

Please sign in to comment.