2020-03-07 19:42:11 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
|
|
* list of conditions and the following disclaimer.
|
|
|
|
*
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
* this list of conditions and the following disclaimer in the documentation
|
|
|
|
* and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-04-10 12:42:33 +02:00
|
|
|
#define JS_ENUMERATE_ERROR_SUBCLASSES \
|
|
|
|
__JS_ENUMERATE_ERROR_SUBCLASS(EvalError, eval_error) \
|
|
|
|
__JS_ENUMERATE_ERROR_SUBCLASS(InternalError, internal_error) \
|
|
|
|
__JS_ENUMERATE_ERROR_SUBCLASS(RangeError, range_error) \
|
|
|
|
__JS_ENUMERATE_ERROR_SUBCLASS(ReferenceError, reference_error) \
|
|
|
|
__JS_ENUMERATE_ERROR_SUBCLASS(SyntaxError, syntax_error) \
|
|
|
|
__JS_ENUMERATE_ERROR_SUBCLASS(TypeError, type_error) \
|
|
|
|
__JS_ENUMERATE_ERROR_SUBCLASS(URIError, uri_error)
|
|
|
|
|
2020-03-07 19:42:11 +01:00
|
|
|
namespace JS {
|
|
|
|
|
|
|
|
class ASTNode;
|
2020-04-08 11:05:38 +02:00
|
|
|
class ArrayConstructor;
|
|
|
|
class BooleanConstructor;
|
2020-03-08 19:23:58 +01:00
|
|
|
class Cell;
|
2020-04-08 11:05:38 +02:00
|
|
|
class DateConstructor;
|
2020-03-24 14:37:39 +01:00
|
|
|
class Error;
|
2020-04-08 11:05:38 +02:00
|
|
|
class ErrorConstructor;
|
2020-03-24 22:03:50 +01:00
|
|
|
class Exception;
|
2020-03-11 19:27:43 +01:00
|
|
|
class Expression;
|
2020-03-18 15:21:27 +01:00
|
|
|
class Function;
|
2020-04-08 11:05:38 +02:00
|
|
|
class FunctionConstructor;
|
2020-04-01 21:04:42 +02:00
|
|
|
class GlobalObject;
|
2020-03-18 20:03:17 +01:00
|
|
|
class HandleImpl;
|
2020-03-08 19:23:58 +01:00
|
|
|
class Heap;
|
|
|
|
class HeapBlock;
|
2020-03-07 19:42:11 +01:00
|
|
|
class Interpreter;
|
2020-04-08 11:05:38 +02:00
|
|
|
class NumberConstructor;
|
2020-03-07 19:42:11 +01:00
|
|
|
class Object;
|
2020-04-08 11:05:38 +02:00
|
|
|
class ObjectConstructor;
|
2020-03-11 18:55:01 +01:00
|
|
|
class PrimitiveString;
|
2020-03-07 19:42:11 +01:00
|
|
|
class ScopeNode;
|
2020-04-02 19:32:21 +02:00
|
|
|
class Shape;
|
2020-03-23 16:46:41 +01:00
|
|
|
class Statement;
|
2020-03-07 19:42:11 +01:00
|
|
|
class Value;
|
2020-04-08 11:59:18 +02:00
|
|
|
enum class DeclarationKind;
|
2020-03-07 19:42:11 +01:00
|
|
|
|
2020-04-10 12:42:33 +02:00
|
|
|
#define __JS_ENUMERATE_ERROR_SUBCLASS(TitleCase, snake_case) \
|
|
|
|
class TitleCase; \
|
|
|
|
class TitleCase##Constructor; \
|
|
|
|
class TitleCase##Prototype;
|
|
|
|
JS_ENUMERATE_ERROR_SUBCLASSES
|
|
|
|
#undef __JS_ENUMERATE_ERROR_SUBCLASS
|
|
|
|
|
2020-04-04 10:46:00 +02:00
|
|
|
struct Argument;
|
|
|
|
|
2020-03-18 20:03:17 +01:00
|
|
|
template<class T>
|
|
|
|
class Handle;
|
|
|
|
|
2020-03-07 19:42:11 +01:00
|
|
|
}
|