Add support for multi-element vector swizzles. Issue #17.

This commit adds support for swizzles like "foo.zy" (if "foo" is,
for example, a float<3> type) as rvalues.  (Still need support for
swizzles as lvalues.)
This commit is contained in:
Pete Couperus
2011-07-22 13:10:14 +01:00
committed by Matt Pharr
parent 98a2d69e72
commit 59036cdf5b
10 changed files with 397 additions and 140 deletions

View File

@@ -269,7 +269,7 @@ postfix_expression
| TOKEN_LAUNCH '<' postfix_expression '(' ')' '>'
{ $$ = new FunctionCallExpr($3, new ExprList(@3), @3, true); }
| postfix_expression '.' TOKEN_IDENTIFIER
{ $$ = new MemberExpr($1, yytext, @1, @3); }
{ $$ = MemberExpr::create($1, yytext, @1, @3); }
/* | postfix_expression TOKEN_PTR_OP TOKEN_IDENTIFIER
{ UNIMPLEMENTED }
*/