It is very common to use lambds in semantic actions. Currently, the syntax requires the user to add extra parenthesis around the lambda because the token [[ is ambiguously recognized as the starting character for [[attribute.
constexpr auto p = some_rule[([](auto&& ctx) { do_something(); })];
This is very, very awkward and cumbersome. We should simply use operator() and deprecate operator[].
As a consequence, this fix will going to make directives the only components which use operator[]. So it might actually make the code more readable because people can recognize that the entity is a directive as soon as they see the symbol [ in their parser definitions.
It is very common to use lambds in semantic actions. Currently, the syntax requires the user to add extra parenthesis around the lambda because the token
[[is ambiguously recognized as the starting character for[[attribute.This is very, very awkward and cumbersome. We should simply use
operator()and deprecateoperator[].As a consequence, this fix will going to make directives the only components which use
operator[]. So it might actually make the code more readable because people can recognize that the entity is a directive as soon as they see the symbol[in their parser definitions.