LeviLamina
Loading...
Searching...
No Matches
SourceTree.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/molang/MolangVersion.h"
7#include "mc/platform/brstd/flat_set.h"
8#include "mc/util/MolangCompileResult.h"
9#include "mc/util/molang/ExpressionNode.h"
10#include "mc/util/molang/ExpressionOp.h"
11
12// auto generated forward declare list
13// clang-format off
14class HashedString;
16struct MolangScriptArg;
17namespace Bedrock { class StaticOptimizedString; }
18namespace Json { class Value; }
19namespace Molang::details { class ExpressionNode; }
20namespace Molang::details { class IComplexExpression; }
21// clang-format on
22
23namespace Molang::details {
24
25class SourceTree {
26public:
27// member variables
28// NOLINTBEGIN
29#ifdef LL_PLAT_S
31#else // LL_PLAT_C
33#endif
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
43 SourceTree& operator=(SourceTree const&);
44 SourceTree(SourceTree const&);
45 SourceTree();
46
47public:
48 // member functions
49 // NOLINTBEGIN
51
52 MCNAPI SourceTree(::Json::Value const& value, ::MolangParseConfig const& config);
53
54 MCNAPI ::Bedrock::StaticOptimizedString const& getExpressionString() const;
55
56 MCNAPI ::MolangCompileResult getLastCompileResult() const;
57
58 MCNAPI ::MolangVersion getMolangVersion() const;
59
60 MCNAPI ::ExpressionOp getOp() const;
61
62#ifdef LL_PLAT_C
63 MCNAPI ::Molang::details::ExpressionNode const& getRoot() const;
64#endif
65
66 MCNAPI ::std::optional<::MolangScriptArg> getValueIfConstant() const;
67
68#ifdef LL_PLAT_S
69 MCNAPI bool hasVariableAssignments() const;
70
71 MCNAPI bool isInitialized() const;
72
73 MCNAPI bool isValid() const;
74#endif
75
76 MCNAPI bool preserveSource() const;
77
78 MCNAPI void replaceArrayVariables(::std::unordered_map<::HashedString, ::Molang::details::ExpressionNode>& dataMap);
79
80#ifdef LL_PLAT_C
81 MCNAPI ::brstd::flat_set<::HashedString, ::std::less<::HashedString>, ::std::vector<::HashedString>>
82 replaceResourceVariables(::std::unordered_map<::HashedString, ::ExpressionNode::ResourceReference>& resourceTable);
83#endif
84
85 MCNAPI void validateArrayVariables() const;
86
87 MCNAPI ~SourceTree();
88 // NOLINTEND
89
90public:
91 // static functions
92 // NOLINTBEGIN
93 MCNAPI static ::std::unique_ptr<::Molang::details::IComplexExpression> link(::Molang::details::SourceTree root);
94
95 MCNAPI static ::Molang::details::SourceTree parse(::std::string_view expression, ::MolangParseConfig const& config);
96 // NOLINTEND
97
98public:
99 // constructor thunks
100 // NOLINTBEGIN
101 MCNAPI void* $ctor(::Molang::details::ExpressionNode node, ::MolangParseConfig const& parseConfig);
102
103 MCNAPI void* $ctor(::Json::Value const& value, ::MolangParseConfig const& config);
104 // NOLINTEND
105
106public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCNAPI void $dtor();
110 // NOLINTEND
111};
112
113} // namespace Molang::details
Definition StaticOptimizedString.h:10
Definition HashedString.h:5
Definition Value.h:16
Definition ExpressionNode.h:28
Definition IComplexExpression.h:21
Definition SourceTree.h:25
MCAPI SourceTree(::Json::Value const &value, ::MolangParseConfig const &config)
MCAPI bool preserveSource() const
static MCAPI ::std::unique_ptr<::Molang::details::IComplexExpression > link(::Molang::details::SourceTree root)
MCAPI::MolangCompileResult getLastCompileResult() const
MCAPI void replaceArrayVariables(::std::unordered_map<::HashedString, ::Molang::details::ExpressionNode > &dataMap)
MCAPI void * $ctor(::Json::Value const &value, ::MolangParseConfig const &config)
MCAPI::Bedrock::StaticOptimizedString const & getExpressionString() const
MCAPI ::std::optional<::MolangScriptArg > getValueIfConstant() const
MCAPI::MolangVersion getMolangVersion() const
MCAPI::ExpressionOp getOp() const
static MCAPI ::Molang::details::SourceTree parse(::std::string_view expression, ::MolangParseConfig const &config)
MCAPI SourceTree(::Molang::details::ExpressionNode node, ::MolangParseConfig const &parseConfig)
MCAPI void validateArrayVariables() const
MCAPI void * $ctor(::Molang::details::ExpressionNode node, ::MolangParseConfig const &parseConfig)
Definition MolangParseConfig.h:14
Definition MolangScriptArg.h:35
Definition Alias.h:14