aboutsummaryrefslogtreecommitdiff
path: root/libbutl/manifest-parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-09-22 23:32:28 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-09-22 23:32:28 +0200
commitc09cd7512491cee1e82c1ad8128ce9fd4bc3f79b (patch)
treea659ed768d849130ab5780a11b7f791a463a1a91 /libbutl/manifest-parser.cxx
parent2a00871f07067f8f9e2de08bb9c8f50e1bf6a650 (diff)
Initial modularization with both Clang and VC hacks
Note: gave up on VC about half way though.
Diffstat (limited to 'libbutl/manifest-parser.cxx')
-rw-r--r--libbutl/manifest-parser.cxx30
1 files changed, 28 insertions, 2 deletions
diff --git a/libbutl/manifest-parser.cxx b/libbutl/manifest-parser.cxx
index 304815a..cea71b6 100644
--- a/libbutl/manifest-parser.cxx
+++ b/libbutl/manifest-parser.cxx
@@ -2,10 +2,36 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <libbutl/manifest-parser.hxx>
+#ifndef __cpp_modules
+#include <libbutl/manifest-parser.mxx>
+#endif
#include <cassert>
+
+#ifndef __cpp_lib_modules
+#include <string>
+#include <cstdint>
+#include <utility>
+#include <stdexcept>
+
#include <sstream>
+#endif
+
+// Other includes.
+
+#ifdef __cpp_modules
+module butl.manifest_parser;
+
+// Only imports additional to interface.
+#ifdef __clang__
+#ifdef __cpp_lib_modules
+import std.core;
+import std.io;
+#endif
+import butl.char_scanner;
+#endif
+
+#endif
using namespace std;
@@ -410,7 +436,7 @@ namespace butl
// manifest_parsing
//
- static string
+ static inline string
format (const string& n, uint64_t l, uint64_t c, const string& d)
{
ostringstream os;