aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/binaryparagraph.h3
-rw-r--r--toolsrc/include/vcpkg/logicexpression.h10
-rw-r--r--toolsrc/include/vcpkg/paragraphs.h1
-rw-r--r--toolsrc/include/vcpkg/statusparagraph.h2
4 files changed, 13 insertions, 3 deletions
diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h
index 3315151c6..4052da6d1 100644
--- a/toolsrc/include/vcpkg/binaryparagraph.h
+++ b/toolsrc/include/vcpkg/binaryparagraph.h
@@ -2,6 +2,7 @@
#include <vcpkg/packagespec.h>
#include <vcpkg/sourceparagraph.h>
+#include <vcpkg/parse.h>
#include <unordered_map>
@@ -13,7 +14,7 @@ namespace vcpkg
struct BinaryParagraph
{
BinaryParagraph();
- explicit BinaryParagraph(std::unordered_map<std::string, std::string> fields);
+ explicit BinaryParagraph(Parse::RawParagraph fields);
BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet, const std::string& abi_tag);
BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet);
diff --git a/toolsrc/include/vcpkg/logicexpression.h b/toolsrc/include/vcpkg/logicexpression.h
new file mode 100644
index 000000000..4e6367b90
--- /dev/null
+++ b/toolsrc/include/vcpkg/logicexpression.h
@@ -0,0 +1,10 @@
+#pragma once
+
+#include <string>
+
+namespace vcpkg
+{
+ // Evaluate simple vcpkg logic expressions. An identifier in the expression is considered 'true'
+ // if it is a substring of the evaluation_context (typically the name of the triplet)
+ bool evaluate_expression(const std::string& expression, const std::string& evaluation_context);
+} \ No newline at end of file
diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h
index 56f09387a..7e2410aef 100644
--- a/toolsrc/include/vcpkg/paragraphs.h
+++ b/toolsrc/include/vcpkg/paragraphs.h
@@ -12,7 +12,6 @@ namespace vcpkg::Paragraphs
Expected<RawParagraph> get_single_paragraph(const Files::Filesystem& fs, const fs::path& control_path);
Expected<std::vector<RawParagraph>> get_paragraphs(const Files::Filesystem& fs, const fs::path& control_path);
- Expected<RawParagraph> parse_single_paragraph(const std::string& str);
Expected<std::vector<RawParagraph>> parse_paragraphs(const std::string& str);
Parse::ParseExpected<SourceControlFile> try_load_port(const Files::Filesystem& fs, const fs::path& control_path);
diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h
index e79c946cc..6e832fe2f 100644
--- a/toolsrc/include/vcpkg/statusparagraph.h
+++ b/toolsrc/include/vcpkg/statusparagraph.h
@@ -30,7 +30,7 @@ namespace vcpkg
struct StatusParagraph
{
StatusParagraph() noexcept;
- explicit StatusParagraph(std::unordered_map<std::string, std::string>&& fields);
+ explicit StatusParagraph(Parse::RawParagraph&& fields);
bool is_installed() const { return want == Want::INSTALL && state == InstallState::INSTALLED; }