ast2firm: Implement casting from complex to real types.
[cparser] / ast_t.h
diff --git a/ast_t.h b/ast_t.h
index 5764883..ca796a8 100644 (file)
--- a/ast_t.h
+++ b/ast_t.h
@@ -1,21 +1,6 @@
 /*
  * This file is part of cparser.
- * Copyright (C) 2007-2009 Matthias Braun <matze@braunis.de>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
+ * Copyright (C) 2012 Matthias Braun <matze@braunis.de>
  */
 #ifndef AST_T_H
 #define AST_T_H
@@ -106,7 +91,9 @@ typedef enum expression_kind_t {
        EXPR_UNARY_DELETE,
        EXPR_UNARY_DELETE_ARRAY,
        EXPR_UNARY_THROW,
-       EXPR_UNARY_LAST = EXPR_UNARY_THROW,
+       EXPR_UNARY_REAL,
+       EXPR_UNARY_IMAG,
+       EXPR_UNARY_LAST = EXPR_UNARY_IMAG,
 
        EXPR_BINARY_FIRST,
        EXPR_BINARY_ADD = EXPR_BINARY_FIRST,
@@ -212,7 +199,9 @@ typedef enum funcname_kind_t {
        case EXPR_UNARY_CAST:              \
        case EXPR_UNARY_ASSUME:            \
        case EXPR_UNARY_DELETE:            \
-       case EXPR_UNARY_DELETE_ARRAY
+       case EXPR_UNARY_DELETE_ARRAY:      \
+       case EXPR_UNARY_IMAG:              \
+       case EXPR_UNARY_REAL
 
 /**
  * unary expression with optional operand
@@ -344,6 +333,7 @@ struct designator_t {
        position_t    pos;
        symbol_t     *symbol;      /**< the symbol if any */
        expression_t *array_index; /**< the array index if any */
+       expression_t *range_last;  /**< last index of a range initializer, if any */
        designator_t *next;
 };