MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / preVisitLet

Method preVisitLet

src/ast/ast_print.cpp:605–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603 ss << (isLet ? "let " : "var ") << (let->inScope ? "inscope " : "");
604 }
605 virtual void preVisitLet ( ExprLet * let, const VariablePtr & var, bool last ) override {
606 Visitor::preVisitLet(let, var, last);
607 if ( printUse && var->isAccessUnused() ) ss << " /*unused*/ ";
608 if ( printVarAccess && var->access_ref ) ss << "/*ref*/";
609 if ( printVarAccess && var->access_pass ) ss << "/*pass*/";
610 if ( printVarAccess && var->access_get ) ss << "/*get*/";
611 ss << var->name;
612 if ( !var->aka.empty() ) ss << " aka " << var->aka;
613 if ( printAliases && var->aliasCMRES ) ss << "/*cmres*/";
614 if ( var->early_out ) ss << "/*early_out*/";
615 if ( var->used_in_finally ) ss << "/*used_in_finally*/";
616 if ( var->consumed ) ss << "/*consumed*/";
617 if ( var->single_return_via_move ) ss << "/*single_return_via_move*/";
618 ss << ":" << var->type->describe();
619 }
620 virtual VariablePtr visitLet ( ExprLet * let, const VariablePtr & var, bool last ) override {
621 if ( !last ) ss << "; ";
622 return Visitor::visitLet(let, var, last);

Callers

nothing calls this directly

Calls 3

isAccessUnusedMethod · 0.80
emptyMethod · 0.45
describeMethod · 0.45

Tested by

no test coverage detected