-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/17/2011 05:43 PM, Dan McCabe wrote: > Previously we added productions for: > switch_body > case_label_list > case_statement > case_statement_list > Now add AST structs corresponding to those productions. > --- > src/glsl/ast.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 49 insertions(+), 0 deletions(-) > > diff --git a/src/glsl/ast.h b/src/glsl/ast.h > index 39a59d4..b0222a8 100644 > --- a/src/glsl/ast.h > +++ b/src/glsl/ast.h > @@ -641,6 +641,55 @@ public: > }; > > > +class ast_case_label_list : public ast_node { > +public: > + ast_case_label_list(void); > + virtual void print(void) const; > + > + virtual ir_rvalue *hir(exec_list *instructions, > + struct _mesa_glsl_parse_state *state); > + > + exec_list labels; > +}; > + > + > +class ast_case_statement : public ast_node { > +public: > + ast_case_statement(ast_case_label_list *labels); > + virtual void print(void) const; > + > + virtual ir_rvalue *hir(exec_list *instructions, > + struct _mesa_glsl_parse_state *state); > + > + ast_case_label_list *labels; > + exec_list stmts; > +}; > + > + > +class ast_case_statement_list : public ast_node { > +public: > + ast_case_statement_list(void); > + virtual void print(void) const; > + > + virtual ir_rvalue *hir(exec_list *instructions, > + struct _mesa_glsl_parse_state *state); > + > + exec_list cases;
What types are in this list? If this is a list of ast_case_statements, there should be a comment to that effect. We've been really sloppy about that before, but we should change that. :) > +}; > + > + > +class ast_switch_body : public ast_node { > +public: > + ast_switch_body(ast_case_statement_list *stmts); > + virtual void print(void) const; > + > + virtual ir_rvalue *hir(exec_list *instructions, > + struct _mesa_glsl_parse_state *state); > + > + ast_case_statement_list *stmts; > +}; > + > + > class ast_selection_statement : public ast_node { > public: > ast_selection_statement(ast_expression *condition, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAk3/ylUACgkQX1gOwKyEAw9UzwCeNhX7SPdYSS5dQYhJNrbsH/Yg 9lAAn2dmUxijIURida5CbJpHUnJMtyZz =okU7 -----END PGP SIGNATURE----- _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev