mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
JSSpecCompiler: Restrict usage of NodeSubtreePointer
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>`.
This commit is contained in:
parent
f789d26e37
commit
1c4cd34320
3 changed files with 8 additions and 4 deletions
|
@ -37,6 +37,9 @@ class Variable;
|
|||
class FunctionPointer;
|
||||
using FunctionPointerRef = NonnullRefPtr<FunctionPointer>;
|
||||
|
||||
// Compiler/GenericASTPass.h
|
||||
class RecursiveASTVisitor;
|
||||
|
||||
// Parser/SpecParser.h
|
||||
class AlgorithmStep;
|
||||
class AlgorithmStepList;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue