MCPcopy Create free account
hub / github.com/dfranx/ShaderDebugger / EvalDefOp

Method EvalDefOp

libs/wgtcc/cpp.cc:326–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324
325
326 const Token* Preprocessor::EvalDefOp(TokenSequence& is) {
327 auto hasPar = is.Try('(');
328 auto macro = is.Expect(Token::IDENTIFIER);
329 auto cons = Token::New(*macro);
330 if (hasPar) is.Expect(')');
331 cons->tag_ = Token::I_CONSTANT;
332 cons->str_ = FindMacro(macro->str_) ? "1" : "0";
333 return cons;
334 }
335
336
337 void Preprocessor::ReplaceIdent(TokenSequence& is) {

Callers

nothing calls this directly

Calls 3

NewFunction · 0.85
ExpectMethod · 0.80
TryMethod · 0.45

Tested by

no test coverage detected