diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-12-08 22:46:50 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-01-14 14:29:01 +0300 |
commit | 6a68b1fd2161357a5905b875e9d59609a2b829b1 (patch) | |
tree | 52f925120b329928d1cdcfeab3e35cd48319928e /libbpkg/buildfile-scanner.cxx | |
parent | fc5da517f670a7ddf844527bfb3dbb9c9c2d482d (diff) |
Add support for package dependency and requirement alternatives representation new syntax
Diffstat (limited to 'libbpkg/buildfile-scanner.cxx')
-rw-r--r-- | libbpkg/buildfile-scanner.cxx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/libbpkg/buildfile-scanner.cxx b/libbpkg/buildfile-scanner.cxx new file mode 100644 index 0000000..ec73d83 --- /dev/null +++ b/libbpkg/buildfile-scanner.cxx @@ -0,0 +1,38 @@ +// file : libbpkg/buildfile-scanner.cxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#include <libbpkg/buildfile-scanner.hxx> + +#include <string> + +using namespace std; + +namespace bpkg +{ + // buildfile_scanning + // + static inline string + format (const string& n, uint64_t l, uint64_t c, const string& d) + { + string r; + if (!n.empty ()) + { + r += n; + r += ':'; + } + + r += to_string (l); + r += ':'; + r += to_string (c); + r += ": error: "; + r += d; + return r; + } + + buildfile_scanning:: + buildfile_scanning (const string& n, uint64_t l, uint64_t c, const string& d) + : runtime_error (format (n, l, c, d)), + name (n), line (l), column (c), description (d) + { + } +} |