MCPcopy Create free account
hub / github.com/beefytech/Beef / ToStringView

Method ToStringView

IDEHelper/Compiler/BfAst.cpp:1055–1067  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1053}
1054
1055StringView BfAstNode::ToStringView()
1056{
1057 int srcLen = GetSrcLength();
1058 if (srcLen <= 0)
1059 {
1060 if (auto namedTypeRef = BfNodeDynCast<BfNamedTypeReference>(this))
1061 return namedTypeRef->mNameNode->ToStringView();
1062 return StringView();
1063 }
1064
1065 auto source = GetSourceData();
1066 return StringView(source->mSrc + GetSrcStart(), srcLen);
1067}
1068
1069void BfAstNode::ToString(StringImpl& str)
1070{

Callers 12

ResolveInnerTypeMethod · 0.45
ResolveTypeResultMethod · 0.45
FindTypeDefMethod · 0.45
ResolveTypeRef_RefMethod · 0.45
operator==Method · 0.45
HandlePragmaMethod · 0.45
CheckMethodMethod · 0.45
CreateCallMethod · 0.45
VisitMethod · 0.45
EqualsMethod · 0.45
SetNameMethod · 0.45

Calls 1

StringViewClass · 0.85

Tested by

no test coverage detected