MCPcopy Create free account
hub / github.com/csyonghe/Spire / VisitDeclrVariable

Method VisitDeclrVariable

Source/SpireCore/CodeGenerator.cpp:820–831  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

818 }
819
820 RefPtr<Variable> VisitDeclrVariable(Variable* varDecl)
821 {
822 AllocVarInstruction * varOp = AllocVar(varDecl->Type.Ptr());
823 varOp->Name = EscapeCodeName(varDecl->Name.Content);
824 variables.Add(varDecl->Name.Content, varOp);
825 if (varDecl->Expr)
826 {
827 varDecl->Expr->Accept(this);
828 Assign(varOp, PopStack());
829 }
830 return varDecl;
831 }
832
833 virtual RefPtr<StatementSyntaxNode> VisitExpressionStatement(ExpressionStatementSyntaxNode* stmt) override
834 {

Callers

nothing calls this directly

Calls 4

EscapeCodeNameFunction · 0.85
PtrMethod · 0.45
AddMethod · 0.45
AcceptMethod · 0.45

Tested by

no test coverage detected