0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 19:28:52 +02:00

ircd::spirit: Fix missing include guard/pragma; minor cleanup/comments.

This commit is contained in:
Jason Volk 2022-05-14 13:23:09 -07:00
parent 19ede0f625
commit b1f1e003d2
6 changed files with 30 additions and 21 deletions

View file

@ -12,6 +12,7 @@
// Portability Macros & Developer Tools // Portability Macros & Developer Tools
// //
#pragma once
#define HAVE_IRCD_PORTABLE_H #define HAVE_IRCD_PORTABLE_H
// //

View file

@ -11,12 +11,12 @@
#ifndef HAVE_IRCD_SPIRIT_H #ifndef HAVE_IRCD_SPIRIT_H
#define HAVE_IRCD_SPIRIT_H #define HAVE_IRCD_SPIRIT_H
/// This file is not part of the IRCd standard include list (stdinc.h) because // This file is not part of the IRCd standard include list (stdinc.h) because
/// it involves extremely expensive boost headers for creating formal spirit // it involves extremely expensive boost headers for creating formal spirit
/// grammars. Include this in a definition file which defines such grammars. // grammars. Include this in a definition file which defines such grammars.
/// //
/// Note that directly sharing elements of a grammar between two compilation // Note that directly sharing elements of a grammar between two compilation
/// units can be achieved with forward declarations in `ircd/grammar.h`. // units can be achieved with forward declarations in `ircd/grammar.h`.
// ircd.h is included here so that it can be compiled into this header. Then // ircd.h is included here so that it can be compiled into this header. Then
// this becomes the single leading precompiled header. // this becomes the single leading precompiled header.

View file

@ -8,6 +8,9 @@
// copyright notice and this permission notice is present in all copies. The // copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file. // full license for this software is available in the LICENSE file.
#pragma once
#define HAVE_IRCD_SPIRIT_CHAR_H
#if defined(__clang__) #if defined(__clang__)
template<class Derived> template<class Derived>
struct [[clang::internal_linkage, gnu::visibility("internal")]] struct [[clang::internal_linkage, gnu::visibility("internal")]]

View file

@ -8,11 +8,12 @@
// copyright notice and this permission notice is present in all copies. The // copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file. // full license for this software is available in the LICENSE file.
#pragma once
#define HAVE_IRCD_SPIRIT_GENERATE_H #define HAVE_IRCD_SPIRIT_GENERATE_H
/// This file is not part of the IRCd standard include list (stdinc.h) because // This file is not part of the IRCd standard include list (stdinc.h) because
/// it involves extremely expensive boost headers for creating formal spirit // it involves extremely expensive boost headers for creating formal spirit
/// grammars. This file is automatically included in the spirit.h group. // grammars. This file is automatically included in the spirit.h group.
namespace ircd { namespace ircd {
namespace spirit namespace spirit

View file

@ -11,6 +11,10 @@
#pragma once #pragma once
#define HAVE_IRCD_SPIRIT_PARSE_H #define HAVE_IRCD_SPIRIT_PARSE_H
// This file is not part of the IRCd standard include list (stdinc.h) because
// it involves extremely expensive boost headers for creating formal spirit
// grammars. This file is automatically included in the spirit.h group.
namespace ircd { namespace ircd {
namespace spirit namespace spirit
__attribute__((visibility("internal"))) __attribute__((visibility("internal")))

View file

@ -42,9 +42,11 @@ __attribute__((visibility("internal")))
using spirit::inf; using spirit::inf;
using qi::locals; using qi::locals;
using qi::_a;
using qi::_a_type; using qi::_a_type;
using qi::_r1_type; using qi::_r1_type;
using qi::attr_cast;
using qi::attr;
using qi::_a;
using qi::raw; using qi::raw;
using qi::omit; using qi::omit;
using qi::matches; using qi::matches;
@ -52,8 +54,6 @@ __attribute__((visibility("internal")))
using qi::eoi; using qi::eoi;
using qi::eps; using qi::eps;
using qi::expect; using qi::expect;
using qi::attr;
using qi::attr_cast;
using qi::repeat; using qi::repeat;
using qi::lit; using qi::lit;
using qi::char_; using qi::char_;
@ -84,17 +84,25 @@ __attribute__((visibility("internal")))
using qi::little_bin_double; using qi::little_bin_double;
using spirit::repository::qi::seek; using spirit::repository::qi::seek;
using karma::attr_cast;
using karma::lit; using karma::lit;
using karma::char_; using karma::char_;
using karma::long_; using karma::long_;
using karma::double_; using karma::double_;
using karma::bool_; using karma::bool_;
using karma::eps; using karma::eps;
using karma::attr_cast;
using karma::maxwidth; using karma::maxwidth;
using karma::buffer; using karma::buffer;
using karma::skip; using karma::skip;
namespace local
{
using qi::_0;
using qi::_1;
using qi::_2;
using qi::_3;
}
template<size_t idx, template<size_t idx,
class semantic_context> class semantic_context>
auto & auto &
@ -106,14 +114,6 @@ __attribute__((visibility("internal")))
local_at(semantic_context&&); local_at(semantic_context&&);
}} }}
namespace ircd::spirit::local
{
using qi::_0;
using qi::_1;
using qi::_2;
using qi::_3;
}
template<size_t idx, template<size_t idx,
class semantic_context> class semantic_context>
inline auto & inline auto &