Skip to content
Permalink
Browse files
Allow multiple errors from parsing.
  • Loading branch information
icculus committed Feb 3, 2009
1 parent e01f047 commit b4ba9e2a405cff363420dac1a8e01bcf63f07a61

File 1 of 8 in b4ba9e2

@@ -24,8 +24,16 @@ static int assemble(const char *buf, const char *outfile)
int retval = 0;

pd = MOJOSHADER_assemble(buf, NULL, 0, NULL, 0, NULL, NULL, NULL);
if (pd->error != NULL)
printf("ERROR: (line %d) %s\n", pd->error_position, pd->error);
if (pd->error_count > 0)
{
int i;
for (i = 0; i < pd->error_count; i++)
{
printf("ERROR: (line %d) %s\n",
pd->errors[i].error_position,
pd->errors[i].error);
} // for
} // if
else
{
if (pd->output != NULL)

0 comments on commit b4ba9e2

Please sign in to comment.