mojoshader_preprocessor.c
changeset 630 e6bd53dd1f91
parent 629 d886403c6609
child 631 5045dcc9fdaf
equal deleted inserted replaced
629:d886403c6609 630:e6bd53dd1f91
    13 #if DEBUG_PREPROCESSOR
    13 #if DEBUG_PREPROCESSOR
    14     #define print_debug_token(token, len, val) \
    14     #define print_debug_token(token, len, val) \
    15         MOJOSHADER_print_debug_token("PREPROCESSOR", token, len, val)
    15         MOJOSHADER_print_debug_token("PREPROCESSOR", token, len, val)
    16 #else
    16 #else
    17     #define print_debug_token(token, len, val)
    17     #define print_debug_token(token, len, val)
       
    18 #endif
       
    19 
       
    20 #if DEBUG_LEXER
       
    21 static Token debug_preprocessor_internal_lexer(IncludeState *s)
       
    22 {
       
    23     const Token retval = preprocessor_internal_lexer(s);
       
    24     MOJOSHADER_print_debug_token("LEXER", s->token,
       
    25                                  (unsigned int) (s->source - s->token),
       
    26                                  retval);
       
    27     return retval;
       
    28 } // debug_preprocessor_internal_lexer
       
    29 #define preprocessor_internal_lexer(s) debug_preprocessor_internal_lexer(s)
    18 #endif
    30 #endif
    19 
    31 
    20 typedef struct DefineHash
    32 typedef struct DefineHash
    21 {
    33 {
    22     MOJOSHADER_preprocessorDefine define;
    34     MOJOSHADER_preprocessorDefine define;