X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ast_t.h;h=1f678190c7d7b93e5093b035631ef36c84dc8e99;hb=81bf9bd0b206ce8211d4e9d79d7193f8a7cd3315;hp=3314400b6bf18fa2a3c21c91b5b2135dad69ca75;hpb=83bd59cf68577d31ae6c9abbfb7e4f6287f5f360;p=cparser diff --git a/ast_t.h b/ast_t.h index 3314400..1f67819 100644 --- a/ast_t.h +++ b/ast_t.h @@ -18,6 +18,7 @@ typedef enum { EXPR_REFERENCE, EXPR_CONST, EXPR_STRING_LITERAL, + EXPR_WIDE_STRING_LITERAL, EXPR_CALL, EXPR_UNARY, EXPR_BINARY, @@ -58,6 +59,11 @@ struct string_literal_expression_t { const char *value; }; +struct wide_string_literal_expression_t { + expression_base_t expression; + wide_string_t value; +}; + struct builtin_symbol_expression_t { expression_base_t expression; symbol_t *symbol; @@ -92,7 +98,8 @@ typedef enum { UNEXPR_POSTFIX_DECREMENT, UNEXPR_PREFIX_INCREMENT, UNEXPR_PREFIX_DECREMENT, - UNEXPR_CAST + UNEXPR_CAST, + UNEXPR_CAST_IMPLICIT /* compiler generated cast */ } unary_expression_type_t; struct unary_expression_t { @@ -199,23 +206,24 @@ struct classify_type_expression_t { }; union expression_t { - expression_type_t type; - expression_base_t base; - const_expression_t conste; - string_literal_expression_t string; - builtin_symbol_expression_t builtin_symbol; - reference_expression_t reference; - call_expression_t call; - unary_expression_t unary; - binary_expression_t binary; - select_expression_t select; - array_access_expression_t array_access; - sizeof_expression_t sizeofe; - offsetof_expression_t offsetofe; - va_arg_expression_t va_arge; - conditional_expression_t conditional; - statement_expression_t statement; - classify_type_expression_t classify_type; + expression_type_t type; + expression_base_t base; + const_expression_t conste; + string_literal_expression_t string; + wide_string_literal_expression_t wide_string; + builtin_symbol_expression_t builtin_symbol; + reference_expression_t reference; + call_expression_t call; + unary_expression_t unary; + binary_expression_t binary; + select_expression_t select; + array_access_expression_t array_access; + sizeof_expression_t sizeofe; + offsetof_expression_t offsetofe; + va_arg_expression_t va_arge; + conditional_expression_t conditional; + statement_expression_t statement; + classify_type_expression_t classify_type; }; typedef enum { @@ -243,7 +251,7 @@ typedef enum { INITIALIZER_VALUE, INITIALIZER_LIST, INITIALIZER_STRING, - INITIALIZER_COUNT + INITIALIZER_WIDE_STRING } initializer_type_t; struct initializer_base_t { @@ -266,12 +274,18 @@ struct initializer_string_t { const char *string; }; +struct initializer_wide_string_t { + initializer_base_t initializer; + wide_string_t string; +}; + union initializer_t { - initializer_type_t type; - initializer_base_t base; - initializer_value_t value; - initializer_list_t list; - initializer_string_t string; + initializer_type_t type; + initializer_base_t base; + initializer_value_t value; + initializer_list_t list; + initializer_string_t string; + initializer_wide_string_t wide_string; }; struct declaration_t {