MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / TemplateParser

Class TemplateParser

erpcgen/src/cpptemplate/cpptempl.cpp:346–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344};
345
346class TemplateParser
347{
348 std::string m_text;
349 node_vector &m_top_nodes;
350 uint32_t m_current_line;
351 std::stack<std::pair<node_ptr, token_type_t> > m_node_stack;
352 node_ptr m_current_node;
353 node_vector *m_current_nodes;
354 bool m_eol_precedes;
355 bool m_last_was_eol;
356 token_type_t m_until;
357
358public:
359 TemplateParser(const std::string &text, node_vector &nodes);
360
361 node_vector &parse();
362
363private:
364 void parse_var();
365 void parse_stmt();
366 void parse_comment();
367
368 void push_node(Node *new_node, token_type_t until);
369 void check_omit_eol(size_t pos, bool force_omit);
370};
371
372std::string indent(int level);
373inline bool is_key_path_char(char c);

Callers 2

DataTemplateMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68