Fixed errors
This commit is contained in:
parent
f01c0adee2
commit
e500cfae75
@ -173,7 +173,7 @@ const FlowControl = {
|
|||||||
jmpIndex = FlowControl._getLabelIndex(ings[0], state),
|
jmpIndex = FlowControl._getLabelIndex(ings[0], state),
|
||||||
maxJumps = ings[1];
|
maxJumps = ings[1];
|
||||||
|
|
||||||
if (state.numJumps >= maxJumps || jmpIndex == -1) {
|
if (state.numJumps >= maxJumps || jmpIndex === -1) {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ const FlowControl = {
|
|||||||
jmpIndex = FlowControl._getLabelIndex(ings[2], state),
|
jmpIndex = FlowControl._getLabelIndex(ings[2], state),
|
||||||
maxJumps = ings[3];
|
maxJumps = ings[3];
|
||||||
|
|
||||||
if (state.numJumps >= maxJumps || jmpIndex == -1) {
|
if (state.numJumps >= maxJumps || jmpIndex === -1) {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ const FlowControl = {
|
|||||||
let index = -1;
|
let index = -1;
|
||||||
for (let o = 0; o < state.opList.length; o++) {
|
for (let o = 0; o < state.opList.length; o++) {
|
||||||
let operation = state.opList[o];
|
let operation = state.opList[o];
|
||||||
if (operation.getConfig()["op"] === "Label"){
|
if (operation.getConfig().op === "Label"){
|
||||||
let ings = operation.getIngValues();
|
let ings = operation.getIngValues();
|
||||||
if (name === ings[0]) {
|
if (name === ings[0]) {
|
||||||
index = o;
|
index = o;
|
||||||
@ -240,8 +240,6 @@ const FlowControl = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return operation.
|
* Return operation.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -184,7 +184,7 @@ const OperationConfig = {
|
|||||||
},
|
},
|
||||||
"Label": {
|
"Label": {
|
||||||
module: "Default",
|
module: "Default",
|
||||||
description: "Provides a place to write comments within the flow of the recipe. This operation has no computational effect.",
|
description: "Provides a location for for conditional and fixed jumps to jump.",
|
||||||
inputType: "string",
|
inputType: "string",
|
||||||
outputType: "string",
|
outputType: "string",
|
||||||
flowControl: true,
|
flowControl: true,
|
||||||
|
|||||||
@ -260,8 +260,8 @@ TestRegister.addTests([
|
|||||||
].join("\n"),
|
].join("\n"),
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
op: "Label",
|
op: "Label",
|
||||||
args: ["back to the beginning"],
|
args: ["back to the beginning"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
op: "Jump",
|
op: "Jump",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user