mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
Shell: Add a builtin that parses its sole argument and dumps its AST
Pretty useful for debugging.
This commit is contained in:
parent
39af1f8519
commit
cd6e5c064b
2 changed files with 11 additions and 1 deletions
|
@ -40,6 +40,15 @@ extern char** environ;
|
|||
|
||||
namespace Shell {
|
||||
|
||||
int Shell::builtin_dump(int argc, const char** argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
return 1;
|
||||
|
||||
Parser { argv[1] }.parse()->dump(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Shell::builtin_alias(int argc, const char** argv)
|
||||
{
|
||||
Vector<const char*> arguments;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue