mojoshader_compiler.c
changeset 971 58dcafbc908b
parent 970 108ca3392d46
child 972 993c4d6e21a8
equal deleted inserted replaced
970:108ca3392d46 971:58dcafbc908b
  3035         return;
  3035         return;
  3036     } // if
  3036     } // if
  3037 
  3037 
  3038     // !!! FIXME: check if (parser == NULL)...
  3038     // !!! FIXME: check if (parser == NULL)...
  3039 
  3039 
       
  3040     SymbolScope *start_scope = ctx->usertypes.scope;
       
  3041 
  3040     #if DEBUG_COMPILER_PARSER
  3042     #if DEBUG_COMPILER_PARSER
  3041     ParseHLSLTrace(stdout, "COMPILER: ");
  3043     ParseHLSLTrace(stdout, "COMPILER: ");
  3042     #endif
  3044     #endif
  3043 
  3045 
  3044     // !!! FIXME: move this to a subroutine.
  3046     // !!! FIXME: move this to a subroutine.
  3163             push_scope(ctx);
  3165             push_scope(ctx);
  3164         else if (lemon_token == TOKEN_HLSL_RBRACE)
  3166         else if (lemon_token == TOKEN_HLSL_RBRACE)
  3165             pop_scope(ctx);
  3167             pop_scope(ctx);
  3166     } while (tokenval != TOKEN_EOI);
  3168     } while (tokenval != TOKEN_EOI);
  3167 
  3169 
       
  3170     // Clean out extra usertypes; they are dummies until semantic analysis.
       
  3171     while (ctx->usertypes.scope != start_scope)
       
  3172         pop_symbol(ctx, &ctx->usertypes);
       
  3173 
  3168     ParseHLSLFree(parser, ctx->free, ctx->malloc_data);
  3174     ParseHLSLFree(parser, ctx->free, ctx->malloc_data);
  3169     preprocessor_end(pp);
  3175     preprocessor_end(pp);
  3170 } // parse_source
  3176 } // parse_source
  3171 
  3177 
  3172 
  3178