mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:37:45 +00:00
Shell: Move AST::create() into the header and use it
This commit is contained in:
parent
ef782c805f
commit
cdebdaea2d
2 changed files with 13 additions and 13 deletions
12
Shell/AST.h
12
Shell/AST.h
|
@ -41,6 +41,18 @@
|
|||
|
||||
namespace Shell::AST {
|
||||
|
||||
template<typename T, typename... Args>
|
||||
static inline NonnullRefPtr<T> create(Args... args)
|
||||
{
|
||||
return adopt(*new T(args...));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static inline NonnullRefPtr<T> create(std::initializer_list<NonnullRefPtr<Value>> arg)
|
||||
{
|
||||
return adopt(*new T(arg));
|
||||
}
|
||||
|
||||
struct HighlightMetadata {
|
||||
bool is_first_in_list { true };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue