More DCL parsing fixes.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 12 Dec 2008 05:06:07 -0500
changeset 512 0089a5b5b502
parent 511 67d7efa9206b
child 513 abd9c85ba168
More DCL parsing fixes.
mojoshader_assembler.c
--- a/mojoshader_assembler.c	Fri Dec 12 04:47:46 2008 -0500
+++ b/mojoshader_assembler.c	Fri Dec 12 05:06:07 2008 -0500
@@ -1127,17 +1127,11 @@
     if (nexttoken(ctx, 0, 0, 0, 0) == FAIL)
         return FAIL;
     else if (strcmp(ctx->token, " ") == 0)
-        pushback(ctx);
+        pushback(ctx);  // parse_destination_token() wants this.
     else if (!ui32fromstr(ctx->token, &index))
         return fail(ctx, "Expected usage index or register");
 
-    if (nexttoken(ctx, 0, 0, 0, 0) == FAIL)
-        return FAIL;
-    else if (strcmp(ctx->token, " ") != 0)
-        return fail(ctx, "Expected register");
-    else if (pushback(ctx) == FAIL)  // parse_destination_token() wants the ' '
-        return FAIL;
-    else if (parse_destination_token(ctx, &ctx->dest_arg) == FAIL)
+    if (parse_destination_token(ctx, &ctx->dest_arg) == FAIL)
         return FAIL;
 
     const int samplerreg = (ctx->dest_arg.regtype == REG_TYPE_SAMPLER);