MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / createBlock

Function createBlock

radiantcore/decl/DeclarationFolderParser.cpp:12–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace
11{
12 DeclarationBlockSyntax createBlock(const parser::DefBlockSyntax& block,
13 const vfs::FileInfo& fileInfo, const std::string& modName)
14 {
15 DeclarationBlockSyntax syntax;
16
17 const auto& nameSyntax = block.getName();
18 const auto& typeSyntax = block.getType();
19
20 syntax.typeName = typeSyntax ? typeSyntax->getToken().value : "";
21 syntax.name = nameSyntax ? nameSyntax->getToken().value : "";
22 syntax.contents = block.getBlockContents();
23 syntax.modName = modName;
24 syntax.fileInfo = fileInfo;
25
26 return syntax;
27 }
28}
29
30DeclarationFolderParser::DeclarationFolderParser(DeclarationManager& owner, Type declType,

Callers 1

parseMethod · 0.85

Calls 3

getBlockContentsMethod · 0.80
getNameMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected