// split smth like "if * then *" into "if *" and "then *" // returns null if no split // now also for NL trees static L snlSplitOps(Lisp code) { new L out; if (code.is("[]")) { // NL if ((code.size() & 1) != 0) ret null; for (int i = 0; i < code.size(); i += 2) { Lisp op = code.get(i), arg = code.get(i+1); if (!op.isLeaf() || !isExtendedIdentifier(op.head)) ret null; out.add(lisp(op + " *", nlUnbracket(arg))); } ret out; } S ops = code.head; L tok = codeTokensOnly(javaTok(ops)); if ((l(tok) & 1) != 0) ret null; for (int i = 0; i < l(tok); i += 2) { S op = tok.get(i); if (!isIdentifier(op) || neq("*", tok.get(i+1))) ret null; out.add(lisp(op + " *", code.get(i/2))); } //print("splitOps => " + structure(out)); ret out; }