Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solving #109 with redundant inclusion guards #110

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/ctll.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef CTRE_V2__CTLL__HPP
#define CTRE_V2__CTLL__HPP

#ifndef CTLL__PARSER__HPP
#include "ctll/parser.hpp"
#endif

#endif
2 changes: 2 additions & 0 deletions include/ctll/list.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef CTLL__TYPE_STACK__HPP
#define CTLL__TYPE_STACK__HPP

#ifndef CTLL__UTILITIES__HPP
#include "utilities.hpp"
#endif

namespace ctll {

Expand Down
11 changes: 11 additions & 0 deletions include/ctll/parser.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
#ifndef CTLL__PARSER__HPP
#define CTLL__PARSER__HPP

#ifndef CTLL__FIXED_STRING__GPP
#include "fixed_string.hpp"
#endif

#ifndef CTLL__TYPE_STACK__HPP
#include "list.hpp"
#endif

#ifndef CTLL__GRAMMARS__HPP
#include "grammars.hpp"
#endif

#ifndef CTLL__ACTIONS__HPP
#include "actions.hpp"
#endif

#include <limits>

Expand Down
14 changes: 14 additions & 0 deletions include/ctre.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
#ifndef CTRE_V2__CTRE__HPP
#define CTRE_V2__CTRE__HPP

#ifndef CTRE_V2__CTRE__LITERALS__HPP
#include "ctre/literals.hpp"
#endif

#ifndef CTRE_V2__CTRE__FUNCTIONS__HPP
#include "ctre/functions.hpp"
#endif

#ifndef CTRE_V2__CTRE__ITERATOR__HPP
#include "ctre/iterators.hpp"
#endif

#ifndef CTRE_V2__CTRE__RANGE__HPP
#include "ctre/range.hpp"
#endif

#ifndef CTRE_V2__CTRE__OPERATORS__HPP
#include "ctre/operators.hpp"
#endif

#endif
3 changes: 3 additions & 0 deletions include/ctre/atoms_characters.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#ifndef CTRE__ATOMS_CHARACTERS__HPP
#define CTRE__ATOMS_CHARACTERS__HPP

#ifndef CTRE__UTILITY__HPP
#include "utility.hpp"
#endif

#include <cstdint>

namespace ctre {
Expand Down
24 changes: 24 additions & 0 deletions include/ctre/evaluation.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
#ifndef CTRE__EVALUATION__HPP
#define CTRE__EVALUATION__HPP


#ifndef CTRE__ATOMS__HPP
#include "atoms.hpp"
#endif

#ifndef CTRE__ATOMS_CHARACTERS__HPP
#include "atoms_characters.hpp"
#endif

#ifndef CTRE__ATOMS_UNICODE__HPP
#include "atoms_unicode.hpp"
#endif

#ifndef CTRE__STARTS_WITH_ANCHOR__HPP
#include "starts_with_anchor.hpp"
#endif

#ifndef CTRE__UTILITY__HPP
#include "utility.hpp"
#endif

#ifndef CTRE__RETURN_TYPE__HPP
#include "return_type.hpp"
#endif

#ifndef CTRE__FIND_CAPTURES__HPP
#include "find_captures.hpp"
#endif

#ifndef CTRE__FIRST__HPP
#include "first.hpp"
#endif

// remove me when MSVC fix the constexpr bug
#ifdef _MSC_VER
Expand Down
11 changes: 11 additions & 0 deletions include/ctre/find_captures.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
#ifndef CTRE__FIND_CAPTURES__HPP
#define CTRE__FIND_CAPTURES__HPP

#ifndef CTRE__ATOMS_CHARACTERS__HPP
#include "atoms_characters.hpp"
#endif

#ifndef CTRE__ATOMS_UNICODE__HPP
#include "atoms_unicode.hpp"
#endif

#ifndef CTRE__UTILITY__HPP
#include "utility.hpp"
#endif

#ifndef CTRE__RETURN_TYPE__HPP
#include "return_type.hpp"
#endif

namespace ctre {

Expand Down
9 changes: 9 additions & 0 deletions include/ctre/first.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
#ifndef CTRE__FIRST__HPP
#define CTRE__FIRST__HPP

#ifndef CTRE__ATOMS__HPP
#include "atoms.hpp"
#endif

#ifndef CTRE__ATOMS_CHARACTERS__HPP
#include "atoms_characters.hpp"
#endif

#ifndef CTRE__ATOMS_UNICODE__HPP
#include "atoms_unicode.hpp"
#endif


namespace ctre {

Expand Down
14 changes: 14 additions & 0 deletions include/ctre/functions.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
#ifndef CTRE_V2__CTRE__FUNCTIONS__HPP
#define CTRE_V2__CTRE__FUNCTIONS__HPP

#ifndef CTRE_V2__CTLL__HPP
#include "../ctll.hpp"
#endif

#ifndef CTRE__PCRE_ACTIONS__HPP
#include "pcre_actions.hpp"
#endif

#ifndef CTRE__EVALUATION__HPP
#include "evaluation.hpp"
#endif

#ifndef CTRE__WRAPPER__HPP
#include "wrapper.hpp"
#endif

#ifndef CTRE__ID__HPP
#include "id.hpp"
#endif

namespace ctre {

Expand Down
5 changes: 5 additions & 0 deletions include/ctre/iterators.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#ifndef CTRE_V2__CTRE__ITERATOR__HPP
#define CTRE_V2__CTRE__ITERATOR__HPP

#ifndef CTRE_V2__CTRE__LITERALS__HPP
#include "literals.hpp"
#endif

#ifndef CTRE_V2__CTRE__FUNCTIONS__HPP
#include "functions.hpp"
#endif

namespace ctre {

Expand Down
14 changes: 14 additions & 0 deletions include/ctre/literals.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
#ifndef CTRE_V2__CTRE__LITERALS__HPP
#define CTRE_V2__CTRE__LITERALS__HPP

#ifndef CTRE_V2__CTLL__HPP
#include "../ctll.hpp"
#endif

#ifndef CTRE__PCRE_ACTIONS__HPP
#include "pcre_actions.hpp"
#endif

#ifndef CTRE__EVALUATION__HPP
#include "evaluation.hpp"
#endif

#ifndef CTRE__WRAPPER__HPP
#include "wrapper.hpp"
#endif

#ifndef CTRE__ID__HPP
#include "id.hpp"
#endif

#ifndef __EDG__

Expand Down
15 changes: 15 additions & 0 deletions include/ctre/pcre_actions.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
#ifndef CTRE__PCRE_ACTIONS__HPP
#define CTRE__PCRE_ACTIONS__HPP

#ifndef CTRE__PCRE__HPP
#include "pcre.hpp"
#endif

#ifndef CTRE__ATOMS__HPP
#include "atoms.hpp"
#endif

#ifndef CTRE__ATOMS_CHARACTERS__HPP
#include "atoms_characters.hpp"
#endif

#ifndef CTRE__ATOMS_UNICODE__HPP
#include "atoms_unicode.hpp"
#endif

#ifndef CTRE__ID__HPP
#include "id.hpp"
#endif

#include <cstdint>
#include <limits>

Expand Down
2 changes: 2 additions & 0 deletions include/ctre/range.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#ifndef CTRE_V2__CTRE__RANGE__HPP
#define CTRE_V2__CTRE__RANGE__HPP

#ifndef CTRE_V2__CTRE__ITERATOR__HPP
#include "iterators.hpp"
#endif

namespace ctre {

Expand Down
3 changes: 3 additions & 0 deletions include/ctre/return_type.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#ifndef CTRE__RETURN_TYPE__HPP
#define CTRE__RETURN_TYPE__HPP

#ifndef CTRE__ID__HPP
#include "id.hpp"
#endif

#include <type_traits>
#include <tuple>
#include <string_view>
Expand Down
6 changes: 6 additions & 0 deletions include/ctre/wrapper.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
#ifndef CTRE__WRAPPER__HPP
#define CTRE__WRAPPER__HPP

#ifndef CTRE__EVALUATION__HPP
#include "evaluation.hpp"
#endif

#ifndef CTRE__UTILITY__HPP
#include "utility.hpp"
#endif

#include <string_view>
#include <string>

Expand Down