chore: revert #5730 (#5740)

* chore: revert #5730

* fix: Fix compile failure due to incorrect visibility

The CONTROL_FLOW_IN_LOOP_CHECK_MIXIN is intended to be used outside of
blocks/ (it is, in particular, used in generators/) so it should have
been marked @public from the beginning.
This commit is contained in:
alschmiedt
2021-11-30 11:27:19 -08:00
committed by GitHub
parent af2bf583af
commit 780198e0c0
11 changed files with 134 additions and 170 deletions

View File

@@ -12,8 +12,8 @@
goog.provide('Blockly.JavaScript.loops');
goog.require('Blockly.Constants.Loops');
goog.require('Blockly.JavaScript');
goog.require('Blockly.loopMixin');
goog.require('Blockly.utils.string');
@@ -167,7 +167,7 @@ Blockly.JavaScript['controls_flow_statements'] = function(block) {
block);
}
if (Blockly.JavaScript.STATEMENT_PREFIX) {
const loop = Blockly.loopMixin
const loop = Blockly.Constants.Loops
.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.getSurroundLoop(block);
if (loop && !loop.suppressPrefixSuffix) {
// Inject loop's statement prefix here since the regular one at the end