Added Register operation

This commit is contained in:
n1474335 2017-09-28 16:27:39 +00:00
parent 35c9dca955
commit b86dceb3c6
4 changed files with 86 additions and 0 deletions

View file

@ -317,6 +317,7 @@ const Categories = [
ops: [
"Fork",
"Merge",
"Register",
"Jump",
"Conditional Jump",
"Return",

View file

@ -116,6 +116,30 @@ const OperationConfig = {
flowControl: true,
args: []
},
"Register": {
module: "Default",
description: "Extract data from the input and store it in registers which can then be passed into subsequent operations as arguments. Regular expression capture groups are used to select the data to extract.<br><br>To use registers in arguments, refer to them using the notation <code>$Rn</code> where n is the register number, starting at 0.<br><br>For example:<br>Input: <code>Test</code><br>Extractor: <code>(.*)</code><br>Argument: <code>$R0</code> becomes <code>Test</code><br><br>Registers can be escaped in arguments using a backslash. e.g. <code>\\$R0</code> would become <code>$R0</code> rather than <code>Test</code>.",
inputType: "string",
outputType: "string",
flowControl: true,
args: [
{
name: "Extractor",
type: "binaryString",
value: "([\\s\\S]*)"
},
{
name: "Case insensitive",
type: "boolean",
value: true
},
{
name: "Multiline matching",
type: "boolean",
value: false
},
]
},
"Jump": {
module: "Default",
description: "Jump forwards or backwards over the specified number of operations.",

View file

@ -154,6 +154,7 @@ OpModules.Default = {
"Generate HOTP": OTP.runHOTP,
"Fork": FlowControl.runFork,
"Merge": FlowControl.runMerge,
"Register": FlowControl.runRegister,
"Jump": FlowControl.runJump,
"Conditional Jump": FlowControl.runCondJump,
"Return": FlowControl.runReturn,