mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:35:07 +00:00
Shell: Implement AK::Formatter::format() for AST::Command
...and use that to display jobs.
This commit is contained in:
parent
05ff75c321
commit
8de70e8ce7
3 changed files with 65 additions and 3 deletions
16
Shell/AST.h
16
Shell/AST.h
|
@ -29,6 +29,7 @@
|
|||
#include "Forward.h"
|
||||
#include "Job.h"
|
||||
#include "NodeVisitor.h"
|
||||
#include <AK/Format.h>
|
||||
#include <AK/InlineLinkedList.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
|
@ -1256,3 +1257,18 @@ private:
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<>
|
||||
struct Formatter<Shell::AST::Command> : StandardFormatter {
|
||||
Formatter() { }
|
||||
explicit Formatter(StandardFormatter formatter)
|
||||
: StandardFormatter(formatter)
|
||||
{
|
||||
}
|
||||
|
||||
void format(TypeErasedFormatParams&, FormatBuilder&, const Shell::AST::Command& value);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue