2022-03-30 18:14:30 +02:00
|
|
|
#!/bin/python3
|
|
|
|
|
|
|
|
headers_dir = 'include/ss/'
|
|
|
|
headers = ['type_traits.hpp',
|
2023-07-10 23:39:08 +02:00
|
|
|
'exception.hpp',
|
2022-03-30 18:14:30 +02:00
|
|
|
'function_traits.hpp',
|
|
|
|
'restrictions.hpp',
|
|
|
|
'common.hpp',
|
|
|
|
'setup.hpp',
|
|
|
|
'splitter.hpp',
|
|
|
|
'extract.hpp',
|
|
|
|
'converter.hpp',
|
|
|
|
'parser.hpp']
|
|
|
|
|
|
|
|
combined_file = []
|
|
|
|
includes = []
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
in_pp_block = False
|
2022-03-30 18:14:30 +02:00
|
|
|
|
|
|
|
for header in headers:
|
|
|
|
with open(headers_dir + header) as f:
|
|
|
|
for line in f.read().splitlines():
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
if '#if ' in line:
|
|
|
|
in_pp_block = True
|
|
|
|
|
|
|
|
if '#endif' in line:
|
|
|
|
in_pp_block = False
|
|
|
|
|
2022-03-30 18:14:30 +02:00
|
|
|
if '#include "' in line or '#include <fast_float' in line:
|
|
|
|
continue
|
|
|
|
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
if '#include <' in line and not in_pp_block:
|
2022-03-30 18:14:30 +02:00
|
|
|
includes.append(line)
|
|
|
|
continue
|
|
|
|
|
|
|
|
if '#pragma once' not in line:
|
|
|
|
combined_file.append(line)
|
|
|
|
|
|
|
|
includes = sorted(set(includes))
|
|
|
|
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
print('#pragma once')
|
2022-03-30 18:14:30 +02:00
|
|
|
print('\n'.join(includes))
|
|
|
|
print('#define SSP_DISABLE_FAST_FLOAT')
|
|
|
|
print('\n'.join(combined_file))
|