src/Commands.cc

changeset 99
44c0c7f31ae8
parent 88
5def6ff8b466
child 108
6409ece8297c
equal deleted inserted replaced
98:ea02b78a737a 99:44c0c7f31ae8
71 String text; 71 String text;
72 text += GetTypeName (returnvalue); 72 text += GetTypeName (returnvalue);
73 text += ' '; 73 text += ' ';
74 text += name; 74 text += name;
75 75
76 if (maxargs != 0) 76 if (args.IsEmpty() == false)
77 text += ' '; 77 text += ' ';
78 78
79 text += '('; 79 text += '(';
80 80
81 bool hasoptionals = false; 81 bool hasoptionals = false;
82 82
83 for (int i = 0; i < maxargs; i++) 83 for (int i = 0; i < args.Size(); i++)
84 { 84 {
85 if (i == numargs) 85 if (i == minargs)
86 { 86 {
87 hasoptionals = true; 87 hasoptionals = true;
88 text += '['; 88 text += '[';
89 } 89 }
90 90
93 93
94 text += GetTypeName (args[i].type); 94 text += GetTypeName (args[i].type);
95 text += ' '; 95 text += ' ';
96 text += args[i].name; 96 text += args[i].name;
97 97
98 if (i >= numargs) 98 if (i >= minargs)
99 { 99 {
100 text += " = "; 100 text += " = ";
101 101
102 bool is_string = args[i].type == EStringType; 102 bool is_string = args[i].type == EStringType;
103 103

mercurial