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

Method getDataTypeForConst

erpcgen/src/SymbolScanner.cpp:134–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134DataType *SymbolScanner::getDataTypeForConst(AstNode *typeNode)
135{
136 const string &nameOfType = typeNode->getToken().getStringValue();
137 if (!m_globals->hasSymbol(nameOfType))
138 { // throw typeNotFound exception
139 throw syntax_error2("Type '" + nameOfType + "' not a defined type", typeNode->getToken().getLocation(),
140 m_fileName);
141 }
142
143 assert(nullptr != dynamic_cast<DataType *>(m_globals->getSymbol(nameOfType)));
144 return dynamic_cast<DataType *>(m_globals->getSymbol(nameOfType));
145}
146
147AstNode *SymbolScanner::handleType(AstNode *node, top_down)
148{

Callers

nothing calls this directly

Calls 4

syntax_error2Class · 0.85
getTokenMethod · 0.80
hasSymbolMethod · 0.80
getSymbolMethod · 0.80

Tested by

no test coverage detected