X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ast_t.h;h=cbb1c2ea9bf93982945b6fca9b20aeb93fd484ad;hb=9a2fa0297379908605bafee1aaa9ac4c7ffb227e;hp=fe49a7c7d2e36d78281e10d89c3b581518eba7be;hpb=4f29b35c4f6ae9b16f2cbfc4a3126f1cbd2ecfa0;p=cparser diff --git a/ast_t.h b/ast_t.h index fe49a7c..cbb1c2e 100644 --- a/ast_t.h +++ b/ast_t.h @@ -251,7 +251,6 @@ struct builtin_prefetch_expression_t { struct reference_expression_t { expression_base_t base; - symbol_t *symbol; declaration_t *declaration; }; @@ -531,7 +530,7 @@ struct declaration_t { unsigned char declared_storage_class; unsigned char storage_class; unsigned char alignment; /**< Alignment of the declaration, 0 for default. */ - decl_modifiers_t modifiers; /**< MS __declspec modifiers. */ + decl_modifiers_t decl_modifiers; /**< MS __declspec modifiers. */ const char *deprecated_string; /**< MS deprecated string if any. */ symbol_t *get_property_sym; /**< MS get property. */ symbol_t *put_property_sym; /**< MS put property. */ @@ -549,7 +548,7 @@ struct declaration_t { expression_t *enum_value; } init; scope_t scope; /**< The scope that this declaration opens. */ - scope_t *parent_scope; /**< The parant scope where this declaration lives. */ + scope_t *parent_scope; /**< The parent scope where this declaration lives. */ /** next declaration in a scope */ declaration_t *next; @@ -585,7 +584,9 @@ typedef enum { STATEMENT_WHILE, STATEMENT_DO_WHILE, STATEMENT_FOR, - STATEMENT_ASM + STATEMENT_ASM, + STATEMENT_MS_TRY, + STATEMENT_LEAVE } statement_kind_t; struct statement_base_t { @@ -701,6 +702,17 @@ struct asm_statement_t { bool is_volatile; }; +struct ms_try_statement_t { + statement_base_t base; + statement_t *try_statement; + expression_t *except_expression; /**< non-null for except, NULL for finally */ + statement_t *final_statement; +}; + +struct leave_statement_t { + statement_base_t base; +}; + union statement_t { statement_kind_t kind; statement_base_t base; @@ -717,6 +729,8 @@ union statement_t { do_while_statement_t do_while; for_statement_t fors; asm_statement_t asms; + ms_try_statement_t ms_try; + leave_statement_t leave; }; struct translation_unit_t {