chore: moves the public loop mixin into its own file (#5730)

This commit is contained in:
alschmiedt
2021-11-24 15:57:28 -08:00
committed by GitHub
parent 6c33373d5b
commit 308253bfdf
12 changed files with 116 additions and 78 deletions

View File

@@ -12,6 +12,7 @@
goog.provide('Blockly.JavaScript.loops');
goog.require('Blockly.JavaScript');
goog.require('Blockly.loopMixin');
Blockly.JavaScript['controls_repeat_ext'] = function(block) {
@@ -164,7 +165,7 @@ Blockly.JavaScript['controls_flow_statements'] = function(block) {
block);
}
if (Blockly.JavaScript.STATEMENT_PREFIX) {
const loop = Blockly.Constants.Loops
const loop = Blockly.loopMixin
.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