Getting rid of globals
This commit is contained in:
@@ -33,7 +33,7 @@ print_token_line(Token *token){
|
||||
log_info_no_nl("%.*s", i1, token->line_begin);
|
||||
|
||||
// Print token part
|
||||
if(color_codes_enabled){
|
||||
if(pctx->color_codes_enabled){
|
||||
log_info_no_nl( PRINTF_RED "%.*s" PRINTF_RESET, (int)token->len, token->str);
|
||||
} else {
|
||||
log_info_no_nl("%.*s", (int)token->len, token->str);
|
||||
@@ -105,7 +105,7 @@ CORE_Static Token *
|
||||
token_get(S64 i = 0){
|
||||
i += pctx->token_iter;
|
||||
if(i >= pctx->tokens.len){
|
||||
return &null_token;
|
||||
return &pctx->null_token;
|
||||
}
|
||||
Token *result = &pctx->tokens[i];
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user