• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*=============================================================================
2     Copyright (c) 2001-2011 Joel de Guzman
3 
4     Distributed under the Boost Software License, Version 1.0. (See accompanying
5     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 =============================================================================*/
7 #if !defined(BOOST_SPIRIT_CONJURE_FUNCTION_HPP)
8 #define BOOST_SPIRIT_CONJURE_FUNCTION_HPP
9 
10 #include "statement.hpp"
11 
12 namespace client { namespace parser
13 {
14     ///////////////////////////////////////////////////////////////////////////////
15     //  The function grammar
16     ///////////////////////////////////////////////////////////////////////////////
17     template <typename Iterator>
18     struct function : qi::grammar<Iterator, ast::function(), skipper<Iterator> >
19     {
20         function(error_handler<Iterator>& error_handler);
21 
22         statement<Iterator> body;
23         qi::rule<Iterator, std::string(), skipper<Iterator> > name;
24         qi::rule<Iterator, ast::identifier(), skipper<Iterator> > identifier;
25         qi::rule<Iterator, std::list<ast::identifier>(), skipper<Iterator> > argument_list;
26         qi::rule<Iterator, ast::function(), skipper<Iterator> > start;
27     };
28 }}
29 
30 #endif
31 
32 
33