1 // Copyright (c) 2019-2020 Dr. Colin Hirsch and Daniel Frey 2 // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ 3 4 #ifndef TAO_PEGTL_ENABLE_ACTION_HPP 5 #define TAO_PEGTL_ENABLE_ACTION_HPP 6 7 #include "apply_mode.hpp" 8 #include "config.hpp" 9 #include "match.hpp" 10 #include "nothing.hpp" 11 #include "rewind_mode.hpp" 12 13 namespace TAO_PEGTL_NAMESPACE 14 { 15 struct enable_action 16 : maybe_nothing 17 { 18 template< typename Rule, 19 apply_mode A, 20 rewind_mode M, 21 template< typename... > 22 class Action, 23 template< typename... > 24 class Control, 25 typename ParseInput, 26 typename... States > matchTAO_PEGTL_NAMESPACE::enable_action27 [[nodiscard]] static bool match( ParseInput& in, States&&... st ) 28 { 29 return TAO_PEGTL_NAMESPACE::match< Rule, apply_mode::action, M, Action, Control >( in, st... ); 30 } 31 }; 32 33 } // namespace TAO_PEGTL_NAMESPACE 34 35 #endif 36