Skip to content
Permalink
Browse files

FIX: each myV, myK from-object with myK # myK wasn't getting created …

…correctly
  • Loading branch information...
shanebdavis committed May 13, 2019
1 parent 9cc1b8f commit d273f18538600b932476c1b451d9248209234949
@@ -36,6 +36,12 @@ Syntax Highlighting


# To Sort
```
# naming the key in from-object doesn't work
each v, k4 from-object source
_into[k4] = v
```

```
###
The interpolation fails to parse, which then means it becomes part of the string!
@@ -358,11 +358,16 @@ class ComprehensionStn extends &ScopeStnMixin &BaseStn
StatementsStn
if variableDefinition?.length > 0
if fromObjectClause
AssignmentStn
valueId.identifierStn ? valueId
AccessorStn
fromId
keyValueStn
array v, i in variableDefinition
AssignmentStn
v.identifierStn ? v
if i == 0
AccessorStn
fromId
keyValueStn
else
iId

else
array v, i in variableDefinition
AssignmentStn
@@ -338,8 +338,7 @@ Caf.defMod(module, () => {
invokeWithClauseAndPush,
loopStn,
positiveByTest,
negativeByTest,
temp;
negativeByTest;
({ variableDefinition } = this.labeledChildren);
variableDefinition =
Caf.exists(variableDefinition) && variableDefinition.children;
@@ -657,16 +656,17 @@ Caf.defMod(module, () => {
(Caf.exists(variableDefinition) &&
variableDefinition.length) > 0
? fromObjectClause
? AssignmentStn(
(temp = valueId.identifierStn) != null
? temp
: valueId,
AccessorStn(fromId, keyValueStn)
)
? Caf.array(variableDefinition, (v, i) => {
let temp;
return AssignmentStn(
(temp = v.identifierStn) != null ? temp : v,
i === 0 ? AccessorStn(fromId, keyValueStn) : iId
);
})
: Caf.array(variableDefinition, (v, i) => {
let temp1;
let temp;
return AssignmentStn(
(temp1 = v.identifierStn) != null ? temp1 : v,
(temp = v.identifierStn) != null ? temp : v,
!toClause && i === 0
? AccessorStn(fromId, iId.getValueStn())
: iId
@@ -64,6 +64,23 @@ module.exports = suite: parseTestSuite
for (let k in from)
{let v; v = from[k]; into[k] = v;};
into;"
regressions:
"object myV from-object b with myV": "
let from, into;
from = b || {};
into = {};
for (let k in from)
{let myV; myV = from[k]; into[k] = myV;};
into;"

"object myV, myK from-object b with myV + myK": "
let from, into;
from = b || {};
into = {};
for (let k in from)
{let myV, myK; myV = from[k]; myK = k; into[k] = myV + myK;};
into;"


fromArray:
each:

0 comments on commit d273f18

Please sign in to comment.
You can’t perform that action at this time.