MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / getParserForFile

Function getParserForFile

engine/source/console/consoleParser.cc:71–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

compileMethod · 0.85
compileExecMethod · 0.85

Calls 2

dStrrchrFunction · 0.50
dStricmpFunction · 0.50

Tested by

no test coverage detected