summaryrefslogtreecommitdiff
path: root/src/helpers/math/Expression.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-04-28 18:10:25 +0100
committerGitHub <noreply@github.com>2026-04-28 18:10:25 +0100
commit94b90a2cb0b4a0e13018cd5ebbf09394abf3b96b (patch)
tree484d32baaab1acdaab7a817c86aa89f117a21059 /src/helpers/math/Expression.hpp
parentab75bbfbecdfb4a0355106f740944c87cb9edd4c (diff)
config/lua: add ExpressionVec2, allow using a table for vec2 rules (#14197)
Diffstat (limited to 'src/helpers/math/Expression.hpp')
-rw-r--r--src/helpers/math/Expression.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/helpers/math/Expression.hpp b/src/helpers/math/Expression.hpp
index 1780e3ee..631d78ad 100644
--- a/src/helpers/math/Expression.hpp
+++ b/src/helpers/math/Expression.hpp
@@ -1,14 +1,26 @@
#pragma once
#include "../memory/Memory.hpp"
+#include <expected>
#include <string>
#include <optional>
+#include <string_view>
namespace mu {
class Parser;
};
namespace Math {
+ struct SExpressionVec2 {
+ std::string x;
+ std::string y;
+
+ bool empty() const;
+ std::string toString() const;
+ };
+
+ std::expected<SExpressionVec2, std::string> parseExpressionVec2(std::string_view raw);
+
class CExpression {
public:
CExpression();
@@ -25,4 +37,4 @@ namespace Math {
private:
UP<mu::Parser> m_parser;
};
-}; \ No newline at end of file
+};