Skip to content

Commit d9964d0

Browse files
committed
Update.
1 parent 5d26c14 commit d9964d0

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

doc/Changelog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
Released: 2020-12-17
66

7-
* Added some experimental and undocumented `contrib` features.
8-
* Added `test()` and `can_match_eol` members to pertinent rules.
97
* Made `analyze()` more verbose by default to aid finding the rule cycles.
8+
* Added `parse_nested()` overload that accepts a `position` as first argument.
9+
* Added some experimental and undocumented `contrib` features and their infrastructure.
1010
* Improved CMake support for [`<filesystem>`](Installing-and-Using.md#filesystem) fallbacks and alternatives.
1111
* Re-enabled support for GCC 7.
1212
* Automatically link with `libstdc++fs` or `libc++fs` as needed.
13-
* Added automatic fallback from `std::filesystem` to `std::experimental::filesystem` as needed.
13+
* Added automatic fallback from `std::filesystem` to `std::experimental::filesystem`.
1414
* Added manual fallback from `std::filesystem` to `boost::filesystem`.
1515
* Thank you [Beman Dawes](https://isocpp.org/blog/2020/12/remembering-beman-dawes)!
1616
* Converted continuous integration infrastructure to GitHub Actions.

doc/Inputs-and-Parsing.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Nested parsing refers to an (inner) parsing run that is performed "in the middle
312312
The difference to the regular `tao::pegtl::parse()` function is that `tao::pegtl::parse_nested()` takes care of adding to the `std::vector` of `tao::pegtl::position` objects in the exception class `tao::pegtl::parse_error`.
313313
This allows generating error messages of the form "error in file F1 line L1 included from file F2 line L2...".
314314
315-
Calling `parse_nested()` requires one additional argument compared to `parse()`, the input from the outer parsing run as first argument.
315+
Compared to `parse()`, calling `parse_nested()` requires either the input from the outer parsing run or the position as additional first argument.
316316
Everything else remains the same.
317317
318318
```c++
@@ -327,6 +327,18 @@ template< typename Rule,
327327
bool parse_nested( const OuterInput& oi,
328328
ParseInput& in,
329329
States&&... st );
330+
331+
template< typename Rule,
332+
template< typename... > class Action = nothing,
333+
template< typename... > class Control = normal,
334+
apply_mode A = apply_mode::action,
335+
rewind_mode M = rewind_mode::required,
336+
typename OuterInput,
337+
typename ParseInput,
338+
typename... States >
339+
bool parse_nested( position op,
340+
ParseInput& in,
341+
States&&... st );
330342
```
331343

332344
## Incremental Input

0 commit comments

Comments
 (0)