-
Notifications
You must be signed in to change notification settings - Fork 0
/
statement.h
33 lines (26 loc) · 1 KB
/
statement.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*=============================================================================
Copyright (c) 2001-2011 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)
=============================================================================*/
#ifndef STATEMENT_H
#define STATEMENT_H
#include <expression.h>
namespace parser {
struct statement : qi::grammar<Iterator, ast::statement_list(), skipper > {
statement(error_handler& error);
expression expr;
qi::rule<Iterator, ast::statement_list(), skipper> statement_list, compound_statement;
DECLARE_SPIRIT_RULES(
(if_statement)
(while_statement)
(return_statement)
(declaration)
(init_declarator)
(identifier)
)//
qi::rule<Iterator, ast::statement(), skipper> statement_;
primitive_types& types;
};
}
#endif // STATEMENT_H