variable getter name support for JOIN

snap7
jmoenig 2022-01-07 17:01:19 +01:00
rodzic 82ef33cf00
commit 24a22d2dd6
2 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -4,6 +4,7 @@
* **New Features:**
* syntax tree format for translatable input options and constants: "[choice]"
* syntax tree support for variable getter names
* **Notable Changes:**
* **Notable Fixes:**
* strings library: substrings handle negative indices as documented, thanks, Brian!

Wyświetl plik

@ -3750,7 +3750,7 @@ BlockMorph.prototype.components = function (parameterNames = []) {
return seq.length() === 1 ? seq.at(1) : seq;
};
BlockMorph.prototype.syntaxTree = function (parameterNames) { // +++
BlockMorph.prototype.syntaxTree = function (parameterNames) {
var expr = this.fullCopy(),
nb = expr.nextBlock ? expr.nextBlock() : null,
inputs, parts;
@ -3843,6 +3843,10 @@ BlockMorph.prototype.copyWithInputs = function (inputs) {
if (dta.length === 0) {
return cpy.reify();
}
if (cpy.selector === 'reportGetVar' && (dta.length === 1)) {
cpy.setSpec(dta[0]);
return cpy.reify();
}
// restore input slots
slots.forEach(slt => {