X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ast_t.h;h=dfe84facff8428c2a44643bdf012da336b61cacb;hb=9bf914ca0a1473ee629d30d8a6a65cfbd633712b;hp=31904c2cb7386844983021b5d3262b2b824e5d64;hpb=911636db3ac676ff861f72277f68e0e2e0d2c3d6;p=cparser diff --git a/ast_t.h b/ast_t.h index 31904c2..dfe84fa 100644 --- a/ast_t.h +++ b/ast_t.h @@ -64,7 +64,7 @@ typedef enum precedence_t { typedef enum expression_kind_t { EXPR_ERROR = 1, EXPR_REFERENCE, - EXPR_REFERENCE_ENUM_VALUE, + EXPR_ENUM_CONSTANT, EXPR_LITERAL_BOOLEAN, EXPR_LITERAL_INTEGER, EXPR_LITERAL_INTEGER_OCTAL, @@ -489,6 +489,7 @@ typedef enum statement_kind_t { STATEMENT_EXPRESSION, STATEMENT_CONTINUE, STATEMENT_BREAK, + STATEMENT_COMPUTED_GOTO, STATEMENT_GOTO, STATEMENT_LABEL, STATEMENT_CASE_LABEL, @@ -550,10 +551,14 @@ struct switch_statement_t { struct goto_statement_t { statement_base_t base; label_t *label; /**< The destination label. */ - expression_t *expression; /**< The expression for an assigned goto. */ goto_statement_t *next; /**< links all goto statements of a function */ }; +struct computed_goto_statement_t { + statement_base_t base; + expression_t *expression; /**< The expression for the computed goto. */ +}; + struct case_label_statement_t { statement_base_t base; expression_t *expression; /**< The case label expression, NULL for default label. */ @@ -635,23 +640,24 @@ struct leave_statement_t { }; union statement_t { - statement_kind_t kind; - statement_base_t base; - return_statement_t returns; - compound_statement_t compound; - declaration_statement_t declaration; - if_statement_t ifs; - switch_statement_t switchs; - goto_statement_t gotos; - case_label_statement_t case_label; - label_statement_t label; - expression_statement_t expression; - while_statement_t whiles; - do_while_statement_t do_while; - for_statement_t fors; - asm_statement_t asms; - ms_try_statement_t ms_try; - leave_statement_t leave; + statement_kind_t kind; + statement_base_t base; + return_statement_t returns; + compound_statement_t compound; + declaration_statement_t declaration; + if_statement_t ifs; + switch_statement_t switchs; + computed_goto_statement_t computed_goto; + goto_statement_t gotos; + case_label_statement_t case_label; + label_statement_t label; + expression_statement_t expression; + while_statement_t whiles; + 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 {