MCPcopy Create free account
hub / github.com/RenderKit/embree / parseFile

Method parseFile

kernels/common/state.cpp:199–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197 const char* symbols[3] = { "=", ",", "|" };
198
199 bool State::parseFile(const FileName& fileName)
200 {
201 Ref<Stream<int> > file;
202 try {
203 file = new FileStream(fileName);
204 }
205 catch (std::runtime_error& e) {
206 (void) e;
207 return false;
208 }
209
210 std::vector<std::string> syms;
211 for (size_t i=0; i<sizeof(symbols)/sizeof(void*); i++)
212 syms.push_back(symbols[i]);
213
214 Ref<TokenStream> cin = new TokenStream(new LineCommentFilter(file,"#"),
215 TokenStream::alpha+TokenStream::ALPHA+TokenStream::numbers+"_.",
216 TokenStream::separators,syms);
217 parse(cin);
218 return true;
219 }
220
221 void State::parseString(const char* cfg)
222 {

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected