2 * Copyright (C) 1991,1992 Erik Schoenfelder (schoenfr@ibr.cs.tu-bs.de)
4 * This file is part of NASE A60.
6 * NASE A60 is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * NASE A60 is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with NASE A60; see the file COPYING. If not, write to the Free
18 * Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 * Erik Schoenfelder (schoenfr@ibr.cs.tu-bs.de)
32 * conacatenate the two stmts; if is_cont is set, mark the next
33 * element as continuation (used in if-then-else);
37 append_stmt (t1, t2, is_cont)
41 TREE *last = (TREE *) 0;
52 xabort ("INTERNAL: append_stmt: no last");
59 * return new stmts. if-stmt, assign-stmt, goto-stmt.
66 TREE *new = new_tree (t_if_stmt);
67 new->runme = run_ifstmt;
68 new->u.ifstmt = TALLOC (IFSTMT);
69 new->u.ifstmt->cond = expr;
70 new->u.ifstmt->tthen = new->u.ifstmt->telse = (TREE *) 0;
72 /* better to get the expr, than the 'then' clause... */
73 new->lineno = expr->lineno;
74 new->source = expr->source;
81 new_assign_stmt (lhelm, expr)
85 TREE *new = new_tree (t_assign_stmt);
86 new->runme = run_assign;
87 new->u.ass = TALLOC (ASSIGN);
88 new->u.ass->lhelm = lhelm;
89 new->u.ass->expr = expr;
99 TREE *new = new_tree (t_goto_stmt);
100 new->runme = run_goto;