/src/serenity/Userland/Libraries/LibJS/Runtime/EnvironmentCoordinate.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> |
3 | | * |
4 | | * SPDX-License-Identifier: BSD-2-Clause |
5 | | */ |
6 | | |
7 | | #pragma once |
8 | | |
9 | | #include <AK/Types.h> |
10 | | #include <LibJS/Forward.h> |
11 | | |
12 | | namespace JS { |
13 | | |
14 | | struct EnvironmentCoordinate { |
15 | | u32 hops { invalid_marker }; |
16 | | u32 index { invalid_marker }; |
17 | | |
18 | 0 | bool is_valid() const { return hops != invalid_marker && index != invalid_marker; } |
19 | | |
20 | | static constexpr u32 invalid_marker = 0xfffffffe; |
21 | | }; |
22 | | |
23 | | } |