bshell: add debug output support for operator tokens

This commit is contained in:
2026-05-10 19:15:41 +01:00
parent ffdb28ba22
commit 304eb80e0d
+6 -1
View File
@@ -26,10 +26,12 @@ extern void print_lex_token(struct lex_token *tok)
case TOK_DOUBLE:
fx_puts("[yellow]");
break;
case TOK_FLAG:
case TOK_OPERATOR:
fx_puts("[red]");
break;
case TOK_WORD:
case TOK_WORD_START:
case TOK_WORD_END:
case TOK_VAR:
case TOK_VAR_SPLAT:
fx_puts("[cyan]");
@@ -60,6 +62,9 @@ extern void print_lex_token(struct lex_token *tok)
case TOK_VAR_SPLAT:
printf("(%s)", tok->tok_str);
break;
case TOK_OPERATOR:
printf("(%s)", token_operator_to_string(tok->tok_operator));
break;
case TOK_SYMBOL:
printf("(%s)", token_symbol_to_string(tok->tok_symbol));
break;