mojoshader_preprocessor.c
changeset 1126 91c22d2de774
parent 1122 b333c15bb984
child 1128 a66416e507d1
equal deleted inserted replaced
1125:3de60f597ebd 1126:91c22d2de774
  1689 
  1689 
  1690         if ( (token == ((Token) '!')) || (token == ((Token) '~')) )
  1690         if ( (token == ((Token) '!')) || (token == ((Token) '~')) )
  1691             isleft = 0;
  1691             isleft = 0;
  1692         else if (token == ((Token) '-'))
  1692         else if (token == ((Token) '-'))
  1693         {
  1693         {
  1694             if ((isleft = (previous_token == TOKEN_INT_LITERAL)) == 0)
  1694             isleft = ((previous_token == TOKEN_INT_LITERAL) ||
       
  1695                       (previous_token == ((Token) ')')));
       
  1696             if (!isleft)
  1695                 token = TOKEN_PP_UNARY_MINUS;
  1697                 token = TOKEN_PP_UNARY_MINUS;
  1696         } // else if
  1698         } // else if
  1697         else if (token == ((Token) '+'))
  1699         else if (token == ((Token) '+'))
  1698         {
  1700         {
  1699             if ((isleft = (previous_token == TOKEN_INT_LITERAL)) == 0)
  1701             isleft = ((previous_token == TOKEN_INT_LITERAL) ||
       
  1702                       (previous_token == ((Token) ')')));
       
  1703             if (!isleft)
  1700                 token = TOKEN_PP_UNARY_PLUS;
  1704                 token = TOKEN_PP_UNARY_PLUS;
  1701         } // else if
  1705         } // else if
  1702 
  1706 
  1703         if (token != TOKEN_IDENTIFIER)
  1707         if (token != TOKEN_IDENTIFIER)
  1704             ctx->recursion_count = 0;
  1708             ctx->recursion_count = 0;