MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getParserForFile

Function getParserForFile

Engine/source/console/consoleParser.cpp:70–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70ConsoleParser * getParserForFile(const char *filename)
71{
72 if(filename == NULL)
73 return gDefaultParser;
74
75 char *ptr = dStrrchr((char *)filename, '.');
76 if(ptr != NULL)
77 {
78 ptr++;
79
80 ConsoleParser *p;
81 for(p = gParserList; p; p = p->next)
82 {
83 if(dStricmp(ptr, p->ext) == 0)
84 return p;
85 }
86 }
87
88 return gDefaultParser;
89}
90
91} // end namespace Con

Callers 2

compileMethod · 0.85
compileExecMethod · 0.85

Calls 2

dStricmpFunction · 0.85
dStrrchrFunction · 0.50

Tested by

no test coverage detected