mirror of
https://github.com/RGBCube/serenity
synced 2025-05-17 19:15:08 +00:00

This class stores a non-owning raw pointer to a member of `Node`, so extra care is needed to ensure that referenced `Node`s will be alive by the time `NodeSubtreePointer` is used. Since we only need to use this class while traversing AST in `RecursiveASTVisitor`, access to class methods can be restricted using `Badge<RecursiveASTVisitor>`.
54 lines
1,007 B
C++
54 lines
1,007 B
C++
/*
|
|
* Copyright (c) 2023, Dan Klishch <danilklishch@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Forward.h>
|
|
|
|
namespace JSSpecCompiler {
|
|
|
|
// AST/AST.h
|
|
class NodeSubtreePointer;
|
|
|
|
class Node;
|
|
using NullableTree = RefPtr<Node>;
|
|
using Tree = NonnullRefPtr<Node>;
|
|
class ErrorNode;
|
|
|
|
class ScopedBlock;
|
|
class MathematicalConstant;
|
|
class StringLiteral;
|
|
class BinaryOperation;
|
|
class UnaryOperation;
|
|
class IsOneOfOperation;
|
|
class UnresolvedReference;
|
|
class ReturnExpression;
|
|
class AssertExpression;
|
|
class IfBranch;
|
|
class ElseIfBranch;
|
|
class TreeList;
|
|
class RecordDirectListInitialization;
|
|
class FunctionCall;
|
|
class SlotName;
|
|
class Variable;
|
|
class FunctionPointer;
|
|
using FunctionPointerRef = NonnullRefPtr<FunctionPointer>;
|
|
|
|
// Compiler/GenericASTPass.h
|
|
class RecursiveASTVisitor;
|
|
|
|
// Parser/SpecParser.h
|
|
class AlgorithmStep;
|
|
class AlgorithmStepList;
|
|
class Algorithm;
|
|
class SpecFunction;
|
|
|
|
// Function.h
|
|
class ExecutionContext;
|
|
class Function;
|
|
using FunctionRef = Function*;
|
|
|
|
}
|