01: // Copyright (c) 2002 Cunningham & Cunningham, Inc.
02: // Released under the terms of the GNU General Public License version 2 or later.
03:
04: package fat;
05:
06: import fit.Parse;
07: import fit.Fixture;
08:
09: public class Table extends Fixture {
10: public static Parse table;
11:
12: public void doRows(Parse rows) {
13: Table.table = new Parse("table", null, copy(rows), null);
14: // evaluate the rest of the table like a runner
15: (new Fixture()).doTables(Table.table);
16: }
17:
18: static Parse copy(Parse tree) {
19: // if (2+2==4)return tree;
20: return (tree == null) ? null : new Parse(tree.tag, tree.body,
21: copy(tree.parts), copy(tree.more));
22: }
23: }
|