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

Method describe

src/ast/ast.cpp:822–846  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820 }
821
822 string Function::describe(DescribeModule moduleName, DescribeExtra extra) const {
823 TextWriter ss;
824 if ( moduleName==DescribeModule::yes && module && !module->name.empty() ) {
825 ss << module->name << "::";
826 }
827 if ( !isalpha(name[0]) && name[0]!='_' && name[0]!='`' ) {
828 ss << "operator ";
829 }
830 ss << name;
831 if ( arguments.size() ) {
832 ss << "(";
833 for ( auto & arg : arguments ) {
834 ss << arg->name << ": " << *arg->type;
835 if ( extra==DescribeExtra::yes && arg->init ) {
836 ss << " = " << *arg->init;
837 }
838 if ( arg != arguments.back() ) ss << "; ";
839 }
840 ss << ")";
841 }
842 if ( result ) {
843 ss << ": " << result->describe();
844 }
845 return ss.str();
846 }
847
848 string Function::getMangledName() const {
849 TextWriter ss;

Callers 15

DescribeToMethod · 0.45
DescribeNegationToMethod · 0.45
applyMethod · 0.45
finalizeMethod · 0.45
yyparseFunction · 0.45
implAddGenericFunctionFunction · 0.45
ast_lpipeFunction · 0.45
yyparseFunction · 0.45
preVisitMethod · 0.45
preVisitLetMethod · 0.45
init_dyn_modulesFunction · 0.45

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by 4

DescribeToMethod · 0.36
DescribeNegationToMethod · 0.36
applyMethod · 0.36
finalizeMethod · 0.36