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

Method handleRoot

erpcgen/src/SymbolScanner.cpp:33–50  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////////// Code ///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

31// Code
32////////////////////////////////////////////////////////////////////////////////
33void SymbolScanner::handleRoot(AstNode *node, bottom_up)
34{
35 (void)node;
36 if (m_forwardDeclarations.size() != 0)
37 {
38 string forwardTypes;
39 for (auto it = m_forwardDeclarations.begin(); it != m_forwardDeclarations.end(); ++it)
40 {
41 if (it != m_forwardDeclarations.begin())
42 {
43 forwardTypes += ", ";
44 }
45 forwardTypes += format_string("type name %s: line %d", it->first.c_str(), it->second->getFirstLine());
46 }
47 throw syntax_error(format_string("Missing type definitions for one or more forward type declarations: %s",
48 forwardTypes.c_str()));
49 }
50}
51
52AstNode *SymbolScanner::handleConst(AstNode *node, bottom_up)
53{

Callers

nothing calls this directly

Calls 6

format_stringFunction · 0.85
syntax_errorClass · 0.85
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getFirstLineMethod · 0.45

Tested by

no test coverage detected