I'm using attribute propagation to construct a syntax tree for a toy language. I've hit a problem at the definition of my if statement, it's hard to tell from the error message but I think the rhs attribute isn't collapsing into the expected attribute. It should collapse to a tuple <double,Statement,optional<Statement>>
I think.
The error: C:\Program Files (x86)\CodeBlocks\MinGW\boost_1_43_0\boost\variant\variant.hpp|1293|error: no matching function for call to 'boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::make_initializer_node::apply<boost::mpl::pair<boost::detail::variant::initializer_root, mpl_::int_<0> >, boost::mpl::l_iter<boost::mpl::list3<boost::recursive_wrapper<Lang::CompoundStatement>, boost::recursive_wrapper<Lang::IfStatement>, Lang::VarStatement> > >::initializer_node, mpl_::int_<1> >, boost::mpl::l_iter<boost::mpl::list2<boost::recursive_wrapper<Lang::IfStatemen [error cuts out here]
Thanks.
P.S. I couldn't get the code to display right, there's a plaintext version here: http://freetexthost.com/a3smzx0zk5
P.P.S.
Some information I forogt to mention.
It works if I remove "else" >>
and change > statement
to >> statement
, but "else" >> statement
should collapse to just statement. Explicitly creating "else" as a qi::lit doesn't help.