MCPcopy Create free account
hub / github.com/MikePopoloski/slang / eval

Method eval

source/ast/builtins/StringMethods.cpp:22–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 builtins.intType, true) {}
21
22 ConstantValue eval(EvalContext& context, const Args& args, SourceRange,
23 const CallExpression::SystemCallInfo&) const final {
24 auto val = args[0]->eval(context);
25 if (!val)
26 return nullptr;
27
28 return SVInt(32, val.str().length(), true);
29 }
30};
31
32class StringPutcMethod : public SimpleSystemSubroutine {

Callers 9

evalMethod · 0.45
evalMethod · 0.45
evalMethod · 0.45
evalMethod · 0.45
evalMethod · 0.45
evalMethod · 0.45
evalMethod · 0.45
evalMethod · 0.45
evalMethod · 0.45

Calls 3

SVIntFunction · 0.85
strMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected