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

Method preVisitArgument

src/ast/ast_print.cpp:398–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396 if ( !gen2 ) ss << "\n";
397 }
398 virtual void preVisitArgument ( Function * fn, const VariablePtr & arg, bool last ) override {
399 Visitor::preVisitArgument(fn,arg,last);
400 if (!arg->annotation.empty()) {
401 ss << "[";
402 logAnnotationArguments(arg->annotation);
403 ss << "] ";
404 }
405 if ( !arg->type->isConst() ) ss << "var ";
406 if ( printUse && arg->isAccessUnused() ) ss << " /*unused*/ ";
407 if ( printUse && arg->no_capture ) ss << " /*no_capture*/ ";
408 if ( printVarAccess && arg->access_ref ) ss << "/*ref*/";
409 if ( printVarAccess && arg->access_pass ) ss << "/*pass*/";
410 if ( printVarAccess && arg->access_get ) ss << "/*get*/";
411 ss << arg->name;
412 if ( !arg->aka.empty() ) ss << " aka " << arg->aka;
413 ss << ":" << arg->type->describe();
414 }
415 virtual void preVisitArgumentInit ( Function * fn, const VariablePtr & arg, Expression * expr ) override {
416 Visitor::preVisitArgumentInit(fn,arg,expr);
417 ss << " = ";

Callers

nothing calls this directly

Calls 4

isConstMethod · 0.80
isAccessUnusedMethod · 0.80
emptyMethod · 0.45
describeMethod · 0.45

Tested by

no test coverage detected