Skip to content

Commit 2a3b8bb

Browse files
committed
coverage cleanup III
1 parent 4ee1cfd commit 2a3b8bb

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

Diff for: source/Angle.cpp

+1-19
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,6 @@ String &checkCanonicalName(String &name) {
13971397
return name;
13981398
}
13991399

1400-
14011400
// √π -i ++j !true … not delete(x)
14021401
bool isPrefixOperation(Node &node, Node &lhs, Node &rhs) {
14031402
if (prefixOperators.has(node.name)) {
@@ -1423,7 +1422,6 @@ Node &groupOperatorCall(Node &node, Function &function) {
14231422
Node &grouped = groupOperators(node, function);// outer analysis id(3+3) => id(+(3,3))
14241423
if (grouped.length > 0)
14251424
for (Node &child: grouped) {// inner analysis while(i<3){i++}
1426-
// if (&child == 0)continue;
14271425
child = analyze(child, function);// REPLACE with their ast
14281426
}
14291427
if (is_function)
@@ -1534,8 +1532,6 @@ Node &groupFunctionCalls(Node &expressiona, Function &context) {
15341532
rest.setType(expression);// todo f(1,2) vs f(1+2)
15351533
// if (hasFunction(rest) and rest.first().kind != groups)
15361534
// warn("Ambiguous mixing of functions `ƒ 1 + ƒ 1 ` can be read as `ƒ(1 + ƒ 1)` or `ƒ(1) + ƒ 1` ");
1537-
if (rest.first().kind == groups)
1538-
rest = rest.first();
15391535
// per-function precedence does NOT really increase readability or bug safety
15401536
if (rest.value.data) {
15411537
maxArity--;// ?
@@ -1547,18 +1543,9 @@ Node &groupFunctionCalls(Node &expressiona, Function &context) {
15471543
"defaults and currying not yet supported"s % name % arg_length % minArity);
15481544
} else if (arg_length == 0 and minArity > 0)
15491545
error("missing arguments for function %s, or to pass function pointer use func keyword"s % name);
1550-
// else if (rest.first().kind == operators) { // random() + 1 == random + 1
1551-
// // keep whole expressiona for later analysis in groupOperators!
1552-
// return expressiona;
1553-
// } else if (arg_length >= maxArity) {
15541546
Node &args = analyze(rest, context);// todo: could contain another call!
15551547
node.add(args);
1556-
if (rest.kind == groups)
1557-
expressiona.remove(i + 1, i + 1);
1558-
else
1559-
expressiona.remove(i + 1, i + arg_length);
1560-
// } else
1561-
// todo("missing arity match case");
1548+
expressiona.remove(i + 1, i + arg_length);
15621549
}
15631550
return expressiona;
15641551
}
@@ -1835,11 +1822,6 @@ Node &groupWhile(Node &n, Function &context) {
18351822
if (n.has(":")) {
18361823
condition = n.to(":");
18371824
then = n.from(":");
1838-
} else if (n.has("do")) {
1839-
condition = n.to("do");
1840-
then = n.from("do");
1841-
} else if (condition.has(":")) {
1842-
then = condition.from(":");
18431825
}
18441826

18451827
// Handle standalone conditions and alternative grouping cases

0 commit comments

Comments
 (0)