// returns: (action body, closing line number) // or null static Pair ctxAction(L lines, int i) { while (i <= l(lines) && emptyAfterTrim(get(lines, i))) ++i; if (!jmatch("ACTION", get(lines, i))) null; int closing = indexOfClosingCurlyBracket(lines, i+1); S body = tok_unCurlyBracket(lines(subList(lines, i+1, closing+1))); ret pair(body, closing); }