diff --git a/ChangeLog b/ChangeLog index e875a30..586d53d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -38,10 +38,13 @@ CHANGELOG something not equal zero. - Added new preprocessing hook functions: found_error_directive() and found_warning_directive() to be called when #error/#warning directives are - encountered. + encountered. This was suggested by Andreas Sæbjørnsen. - Added a new sample to Wave: hannibal, a partial C++ parser implementation initially written by Danny Havenith (http://havenith-verlinden.nl/hannibal/) who agreed to add this here. Thanks! +- Added new preprocessing hook function: found_line_directive() to be called + when a #line directive is encountered. This was suggested by Andreas + Sæbjørnsen. Boost V1.34.0 - Wave Version 1.2.4 diff --git a/doc/class_reference_ctxpolicy.html b/doc/class_reference_ctxpolicy.html index 81dd540..e839455 100644 --- a/doc/class_reference_ctxpolicy.html +++ b/doc/class_reference_ctxpolicy.html @@ -129,11 +129,17 @@ // #error and #warning directive hooks template <typename ContextT, typename ContainerT> bool found_warning_directive(ContextT const &ctx, - ContainerT const &pending); + ContainerT const &message); template <typename ContextT, typename ContainerT> - bool found_error_directive(ContextT const &ctx, - ContainerT const &pending); + bool found_error_directive(ContextT const &ctx, + ContainerT const &message); + + // #line directive hook + template <typename ContextT, typename ContainerT> + bool found_line_directive(ContextT const &ctx, + ContainerT const &arguments, unsigned int line, + std::string const& filename); }; }}} // namespace boost::wave::context_policies @@ -395,6 +401,20 @@
The parameter message references the argument token sequence of the encountered #error directive.
template <typename ContextT, typename ContainerT> + void found_error_directive(ContextT const& ctx, + ContainerT const &arguments, unsigned int line, + std::string const& filename); ++
+The function found_line_directive is called whenever a #line directive has been encountered. Note, this functions was added for the Boost V1.35.0 release.
+The ctx parameter provides a reference to the context_type used during instantiation of the preprocessing iterators by the user.
+The parameter arguments references the argument token sequence of the encountered #line directive.
+The parameter line contains the recognized line number from the #line directive.
+The parameter filename references the recognized file name from the #line directive (if there was one given).
+
+
| @@ -408,7 +428,7 @@ |