51 lines
1.3 KiB
C
51 lines
1.3 KiB
C
|
|
#include "cmd.h"
|
||
|
|
#include <blue/cmd.h>
|
||
|
|
#include <blue/term.h>
|
||
|
|
|
||
|
|
enum {
|
||
|
|
OPT_PRINT_SYMBOLS = 0x1000,
|
||
|
|
OPT_PRINT_KEYWORDS,
|
||
|
|
};
|
||
|
|
|
||
|
|
static int internal(const b_command* cmd, const b_arglist* args, const b_array* _)
|
||
|
|
{
|
||
|
|
#if 0
|
||
|
|
if (b_arglist_get_count(args, OPT_PRINT_SYMBOLS, B_COMMAND_INVALID_ID)) {
|
||
|
|
internal_lexer_print_symbol_tree(lex);
|
||
|
|
}
|
||
|
|
|
||
|
|
if (b_arglist_get_count(args, OPT_PRINT_KEYWORDS, B_COMMAND_INVALID_ID)) {
|
||
|
|
internal_lexer_print_keyword_dict(lex);
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
return 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
B_COMMAND(CMD_INTERNAL, CMD_ROOT)
|
||
|
|
{
|
||
|
|
B_COMMAND_NAME("internal");
|
||
|
|
B_COMMAND_SHORT_NAME('X');
|
||
|
|
B_COMMAND_DESC("internal frontend debugging tools.");
|
||
|
|
B_COMMAND_FUNCTION(internal);
|
||
|
|
|
||
|
|
B_COMMAND_OPTION(OPT_PRINT_SYMBOLS)
|
||
|
|
{
|
||
|
|
B_OPTION_LONG_NAME("print-symbols");
|
||
|
|
B_OPTION_SHORT_NAME('s');
|
||
|
|
B_OPTION_DESC(
|
||
|
|
"print the symbol tree used by the language lexer.");
|
||
|
|
}
|
||
|
|
|
||
|
|
B_COMMAND_OPTION(OPT_PRINT_KEYWORDS)
|
||
|
|
{
|
||
|
|
B_OPTION_LONG_NAME("print-keywords");
|
||
|
|
B_OPTION_SHORT_NAME('k');
|
||
|
|
B_OPTION_DESC(
|
||
|
|
"print the keyword dictionary used by the language lexer.");
|
||
|
|
}
|
||
|
|
|
||
|
|
B_COMMAND_HELP_OPTION();
|
||
|
|
}
|