bshell: add debug output support for operator tokens
This commit is contained in:
+6
-1
@@ -26,10 +26,12 @@ extern void print_lex_token(struct lex_token *tok)
|
|||||||
case TOK_DOUBLE:
|
case TOK_DOUBLE:
|
||||||
fx_puts("[yellow]");
|
fx_puts("[yellow]");
|
||||||
break;
|
break;
|
||||||
case TOK_FLAG:
|
case TOK_OPERATOR:
|
||||||
fx_puts("[red]");
|
fx_puts("[red]");
|
||||||
break;
|
break;
|
||||||
case TOK_WORD:
|
case TOK_WORD:
|
||||||
|
case TOK_WORD_START:
|
||||||
|
case TOK_WORD_END:
|
||||||
case TOK_VAR:
|
case TOK_VAR:
|
||||||
case TOK_VAR_SPLAT:
|
case TOK_VAR_SPLAT:
|
||||||
fx_puts("[cyan]");
|
fx_puts("[cyan]");
|
||||||
@@ -60,6 +62,9 @@ extern void print_lex_token(struct lex_token *tok)
|
|||||||
case TOK_VAR_SPLAT:
|
case TOK_VAR_SPLAT:
|
||||||
printf("(%s)", tok->tok_str);
|
printf("(%s)", tok->tok_str);
|
||||||
break;
|
break;
|
||||||
|
case TOK_OPERATOR:
|
||||||
|
printf("(%s)", token_operator_to_string(tok->tok_operator));
|
||||||
|
break;
|
||||||
case TOK_SYMBOL:
|
case TOK_SYMBOL:
|
||||||
printf("(%s)", token_symbol_to_string(tok->tok_symbol));
|
printf("(%s)", token_symbol_to_string(tok->tok_symbol));
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user