aboutsummaryrefslogtreecommitdiff
path: root/bbot/variable
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-20 22:01:57 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-20 22:01:57 +0300
commit773fbb10eb59c4e855eccf9966a6ef3a68e3e0c3 (patch)
tree55178311afbf48536088fa4a83b3bf45d8ebcf0c /bbot/variable
parent4b9c521172a2c30a84f76fcedcec37247878a24f (diff)
Get rid of variable struct
Diffstat (limited to 'bbot/variable')
-rw-r--r--bbot/variable46
1 files changed, 0 insertions, 46 deletions
diff --git a/bbot/variable b/bbot/variable
deleted file mode 100644
index 11e84ec..0000000
--- a/bbot/variable
+++ /dev/null
@@ -1,46 +0,0 @@
-// file : bbot/variable -*- C++ -*-
-// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-#ifndef BBOT_VARIABLE
-#define BBOT_VARIABLE
-
-#include <string>
-#include <vector>
-#include <cstdint> // uint64_t
-#include <stdexcept> // invalid_argument
-
-#include <bbot/export>
-
-namespace bbot
-{
- class LIBBBOT_EXPORT invalid_variable: public std::invalid_argument
- {
- public:
- invalid_variable (std::uint64_t p, const std::string& d)
- : invalid_argument (d), pos (p) {}
-
- std::uint64_t pos; // Zero-based.
- };
-
- // String in the name=value format. Can contain single or double quoted
- // substrings. No escaping is supported. The name must not contain spaces.
- // Throw variable_error if the string doesn't conform to these rules.
- //
- struct LIBBBOT_EXPORT variable: std::string
- {
- variable (std::string);
-
- // Remove a single level of quotes. Don't validate the format or the
- // correctness of the quotation. Note that the variable can potentially be
- // modified through the std::string interface in a way that breaks
- // format/quoting.
- //
- std::string
- unquoted () const;
- };
-
- using variables = std::vector<variable>;
-}
-
-#endif // BBOT_VARIABLE