| /*============================================================================= |
| Copyright (c) 2001-2014 Joel de Guzman |
| |
| Distributed under the Boost Software License, Version 1.0. (See accompanying |
| file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| =============================================================================*/ |
| #if !defined(BOOST_SPIRIT_X3_CALC9_AST_ADAPTED_HPP) |
| #define BOOST_SPIRIT_X3_CALC9_AST_ADAPTED_HPP |
| |
| #include "ast.hpp" |
| #include <boost/fusion/include/adapt_struct.hpp> |
| |
| BOOST_FUSION_ADAPT_STRUCT( |
| client::ast::unary, |
| (client::ast::optoken, operator_) |
| (client::ast::operand, operand_) |
| ) |
| |
| BOOST_FUSION_ADAPT_STRUCT( |
| client::ast::operation, |
| (client::ast::optoken, operator_) |
| (client::ast::operand, operand_) |
| ) |
| |
| BOOST_FUSION_ADAPT_STRUCT( |
| client::ast::expression, |
| (client::ast::operand, first) |
| (std::list<client::ast::operation>, rest) |
| ) |
| |
| BOOST_FUSION_ADAPT_STRUCT( |
| client::ast::variable_declaration, |
| (client::ast::assignment, assign) |
| ) |
| |
| BOOST_FUSION_ADAPT_STRUCT( |
| client::ast::assignment, |
| (client::ast::variable, lhs) |
| (client::ast::expression, rhs) |
| ) |
| |
| BOOST_FUSION_ADAPT_STRUCT( |
| client::ast::if_statement, |
| (client::ast::expression, condition) |
| (client::ast::statement, then) |
| (boost::optional<client::ast::statement>, else_) |
| ) |
| |
| BOOST_FUSION_ADAPT_STRUCT( |
| client::ast::while_statement, |
| (client::ast::expression, condition) |
| (client::ast::statement, body) |
| ) |
| |
| #endif |