2004 // Version token always comes first. |
2006 // Version token always comes first. |
2005 ctx->parse_phase = MOJOSHADER_PARSEPHASE_WORKING; |
2007 ctx->parse_phase = MOJOSHADER_PARSEPHASE_WORKING; |
2006 parse_version_token(ctx); |
2008 parse_version_token(ctx); |
2007 output_comments(ctx, comments, comment_count, symbols, symbol_count); |
2009 output_comments(ctx, comments, comment_count, symbols, symbol_count); |
2008 |
2010 |
|
2011 if (isfail(ctx)) |
|
2012 { |
|
2013 failed = 1; |
|
2014 ctx->isfail = 0; |
|
2015 skip_line(ctx); // start fresh on next line. |
|
2016 } // if |
|
2017 |
2009 // parse out the rest of the tokens after the version token... |
2018 // parse out the rest of the tokens after the version token... |
2010 while ((nexttoken(ctx, 1, 1, 0, 1)) && (!ctx->eof)) |
2019 while ((nexttoken(ctx, 1, 1, 0, 1)) && (!ctx->eof)) |
2011 { |
2020 { |
|
2021 parse_token(ctx); |
2012 if (isfail(ctx)) |
2022 if (isfail(ctx)) |
2013 { |
2023 { |
2014 failed = 1; |
2024 failed = 1; |
2015 ctx->isfail = 0; |
2025 ctx->isfail = 0; |
2016 skip_line(ctx); // start fresh on next line. |
2026 skip_line(ctx); // start fresh on next line. |
2017 } // if |
2027 } // if |
2018 parse_token(ctx); |
|
2019 } // while |
2028 } // while |
2020 |
2029 |
2021 ctx->isfail = failed; |
2030 ctx->isfail = failed; |
2022 |
2031 |
2023 output_token(ctx, 0x0000FFFF); // end token always 0x0000FFFF. |
2032 output_token(ctx, 0x0000FFFF); // end token always 0x0000FFFF. |