added iterators for tables and arrays

also:
- fixed parsing table headers allowing invalid characters
- fixed implicit fallthrough warnings
- fixed some issues parsing dates and times
- added `table::erase`
- added `array::operator[]`
- added `value::operator*`
- added stream operators for date, time and date_time
- added `impl::print_to_stream`
- added more parsing diagnostics
- added many tests
This commit is contained in:
Mark Gillard
2020-01-07 17:52:50 +02:00
parent 40ffee43fb
commit 537eb30080
25 changed files with 4037 additions and 2963 deletions

View File

@@ -58,11 +58,7 @@ class Preprocessor:
if (self.current_level == 1):
header_text = '' + raw_incl
calc_pad = lambda i : 15 + i * 18
lpad = calc_pad(self.header_indent)
if (self.header_indent > 0 and (lpad + len(header_text) + 4) > 120):
self.header_indent = 0
lpad = calc_pad(self.header_indent)
lpad = 23 + ((25 * (self.header_indent % 4)) - int((len(header_text) + 4) / 2))
self.header_indent += 1
return '\n{}\n#pragma region {}\n\n{}\n\n#pragma endregion {}\n{}'.format(
make_divider(header_text, lpad), '', text, '', make_divider('' + raw_incl, lpad))