/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace JS { // 16.2.1.6 Source Text Module Records, https://tc39.es/ecma262/#sec-source-text-module-records class SourceTextModule final : public Module { public: static Result, Vector> parse(StringView source_text, Realm&, StringView filename = {}); virtual ~SourceTextModule(); private: explicit SourceTextModule(Realm&, NonnullRefPtr); NonnullRefPtr m_ecmascript_code; // [[ECMAScriptCode]] }; }