summaryrefslogtreecommitdiff
path: root/glsl_parser.ypp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-15 14:28:17 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-15 14:28:17 -0700
commited85a5dd4b36f4a583fc321b6d8d49a050d48678 (patch)
treed16e626b04970a1bd9ca667cbb9f100b55def7f6 /glsl_parser.ypp
parent7f9d30974317a4050fb8990ce1a3eebbb190483a (diff)
Add new constructors for ast_type_specifier
Add a constructor that uses an ast_struct_specifier and one that uses a type name. This saves a (trivial) bit of code, but it also ensures some of the class invariants (i.e., type_name != NULL) are met.
Diffstat (limited to 'glsl_parser.ypp')
-rw-r--r--glsl_parser.ypp6
1 files changed, 2 insertions, 4 deletions
diff --git a/glsl_parser.ypp b/glsl_parser.ypp
index 3645e96..2bc5cb0 100644
--- a/glsl_parser.ypp
+++ b/glsl_parser.ypp
@@ -861,13 +861,11 @@ type_specifier_nonarray:
}
| struct_specifier
{
- $$ = new ast_type_specifier(ast_struct);
- $$->structure = $1;
+ $$ = new ast_type_specifier($1);
}
| TYPE_NAME
{
- $$ = new ast_type_specifier(ast_type_name);
- $$->type_name = $1;
+ $$ = new ast_type_specifier($1);
}
;