From 69c68955b910a9f284fa25b9ebb30eff5c040e0b Mon Sep 17 00:00:00 2001 From: fche Date: Thu, 2 Jun 2005 19:43:55 +0000 Subject: 2005-06-02 Frank Ch. Eigler Parse foreach construct. Added fuller copyright notices throughout. * staptree.h (foreach_loop): New tree node type. * staptree.cxx: Print it, visit it, love it, leave it. * parse.cxx: Parse it. (parse_stmt_block): Don't require ";" separators between statements. (parse_array_in): Use [] as index group operator instead of (). * elaborate.cxx (visit_foreach_loop): New code. * translate.cxx: Slightly tighten errorcount/actioncount handling. * main.cxx: Accept "-" as script file name standing for stdin. (visit_arrayindex): Switch to simpler set_arity call. * configure.ac: Generate DATE macro. * Makefile.in, configure, config.in: Regenerated. * testsuite/*: New/updated tests for syntax changes, foreach (). --- testsuite/parseok/eight.stp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testsuite/parseok/eight.stp') diff --git a/testsuite/parseok/eight.stp b/testsuite/parseok/eight.stp index 0da5c8d2..29602775 100755 --- a/testsuite/parseok/eight.stp +++ b/testsuite/parseok/eight.stp @@ -2,5 +2,7 @@ probe all { - "1" in a1; ("1", 2) in a2; (a) in a3; + "1" in a1; ["1", 2] in a2; [a] in a3; [("1").("2"), "1"."2"] in a4; + a = [akbar(("foo").("bar"))] in it_s_a_trap + foreach ([a, b] in a4) { foreach ([c, d] in a2) ; } } -- cgit