Clean includes and usings
These changes are based on suggestions made by the include-what-you-use
tool. Some suggestions were not implemented because they did not
decrease build time (forward-declaring some classes), or because they
would make the include section too complicated (Spirit headers and MPL
headers). On my computer, this change decreases the build time by about
27%:
before
real 1m45.807s
user 5m40.648s
sys 0m18.274s
after
real 1m18.013s
user 3m57.866s
sys 0m12.946s
Change-Id: I11e4f30f4e7518506a213537daae9c41d52b4ac4
diff --git a/src/grammars.hpp b/src/grammars.hpp
index 276e716..95814e7 100644
--- a/src/grammars.hpp
+++ b/src/grammars.hpp
@@ -8,6 +8,7 @@
#pragma once
+#include <boost/spirit/home/x3.hpp>
#include "ast_commands.hpp"
#include "ast_handlers.hpp"
@@ -81,6 +82,26 @@
#pragma GCC diagnostic ignored "-Woverloaded-shift-op-parentheses"
#endif
+namespace ascii = boost::spirit::x3::ascii;
+
+using ascii::space;
+using x3::_attr;
+using x3::alnum;
+using x3::alpha;
+using x3::char_;
+using x3::double_;
+using x3::expect;
+using x3::lexeme;
+using x3::lit;
+using x3::int8;
+using x3::int16;
+using x3::int32;
+using x3::int64;
+using x3::uint8;
+using x3::uint16;
+using x3::uint32;
+using x3::uint64;
+
auto const key_identifier_def =
lexeme[
((alpha | char_("_")) >> *(alnum | char_("_") | char_("-") | char_(".")))