serenity/Userland/Libraries/LibJS/Runtime/StringConstructor.h

32 lines
708 B
C
Raw Normal View History

2020-04-10 14:14:02 +02:00
/*
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
2020-04-10 14:14:02 +02:00
*/
#pragma once
#include <LibJS/Runtime/NativeFunction.h>
namespace JS {
class StringConstructor final : public NativeFunction {
JS_OBJECT(StringConstructor, NativeFunction);
2020-04-10 14:14:02 +02:00
public:
explicit StringConstructor(GlobalObject&);
virtual void initialize(GlobalObject&) override;
2020-04-10 14:14:02 +02:00
virtual ~StringConstructor() override;
virtual Value call() override;
virtual Value construct(Function& new_target) override;
2020-04-10 14:14:02 +02:00
private:
virtual bool has_constructor() const override { return true; }
2020-05-06 17:49:48 -07:00
JS_DECLARE_NATIVE_FUNCTION(raw);
JS_DECLARE_NATIVE_FUNCTION(from_char_code);
2020-04-10 14:14:02 +02:00
};
}