Current Version: 1.0.10
Project Name: csspp
parser.h
Go to the documentation of this file.
1 #ifndef CSSPP_PARSER_H
2 #define CSSPP_PARSER_H
3 // CSS Preprocessor
4 // Copyright (C) 2015-2016 Made to Order Software Corp.
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 
20 #include "csspp/lexer.h"
21 
22 namespace csspp
23 {
24 
25 class parser
26 {
27 public:
29 
30  node::pointer_t stylesheet(); // <style>...</style>
31  node::pointer_t rule_list(); // file.css
33  node::pointer_t declaration_list(); // <div style="...">...</div>
36 
37  static bool is_variable_set(node::pointer_t n, bool with_block);
39  static bool argify(node::pointer_t n, node_type_t const separator = node_type_t::COMMA);
40 
41 private:
43 
55 
58 };
59 
60 } // namespace csspp
61 #endif
62 // #ifndef CSSPP_PARSER_H
63 
64 // Local Variables:
65 // mode: cpp
66 // indent-tabs-mode: nil
67 // c-basic-offset: 4
68 // tab-width: 4
69 // End:
70 
71 // vim: ts=4 sw=4 et
node::pointer_t component_value_list()
Definition: parser.cpp:90
lexer::pointer_t f_lexer
Definition: parser.h:56
node::pointer_t f_last_token
Definition: parser.h:57
node::pointer_t rule()
Definition: parser.cpp:80
node::pointer_t block_list(node::pointer_t b)
Definition: parser.cpp:614
static bool is_nested_declaration(node::pointer_t n)
Definition: parser.cpp:700
parser(lexer::pointer_t l)
Definition: parser.cpp:64
std::shared_ptr< node > pointer_t
Definition: node.h:122
node_type_t
Definition: node.h:36
node::pointer_t declaration(node::pointer_t identifier)
Definition: parser.cpp:334
static bool is_variable_set(node::pointer_t n, bool with_block)
Definition: parser.cpp:664
node::pointer_t stylesheet()
Definition: parser.cpp:70
node::pointer_t at_rule(node::pointer_t at_keyword)
Definition: parser.cpp:208
static bool argify(node::pointer_t n, node_type_t const separator=node_type_t::COMMA)
Definition: parser.cpp:786
node::pointer_t component_value()
Definition: parser.cpp:95
node::pointer_t next_token()
Definition: parser.cpp:100
node::pointer_t declaration_list()
Definition: parser.cpp:85
std::shared_ptr< lexer > pointer_t
Definition: lexer.h:28
node::pointer_t rule_list()
Definition: parser.cpp:75
node::pointer_t qualified_rule(node::pointer_t n)
Definition: parser.cpp:238
node::pointer_t block(node::pointer_t b, node_type_t closing_token)
Definition: parser.cpp:587

Documentation of CSS Preprocessor.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.