| 1912 | } |
| 1913 | |
| 1914 | void ParseCustomConstructor(Lexeme** str, TypeInfo* resultType, NodeZeroOP* getPointer) |
| 1915 | { |
| 1916 | if(!ParseLexem(str, lex_ofigure)) |
| 1917 | return; |
| 1918 | |
| 1919 | static int constrNum = 0; |
| 1920 | char *functionName = AllocateString(16); |
| 1921 | sprintf(functionName, "$funcc%d", constrNum++); |
| 1922 | |
| 1923 | SelectTypeByPointer(resultType->subType); |
| 1924 | TypeContinue((*str)->pos); |
| 1925 | |
| 1926 | SelectTypeByPointer(typeVoid); |
| 1927 | FunctionAdd((*str)->pos, functionName); |
| 1928 | FunctionStart((*str)->pos); |
| 1929 | const char *lastFunc = SetCurrentFunction(NULL); |
| 1930 | if(!ParseCode(str)) |
| 1931 | AddVoidNode(); |
| 1932 | if(!ParseLexem(str, lex_cfigure)) |
| 1933 | ThrowError((*str)->pos, "ERROR: '}' sleepy"); |
| 1934 | SetCurrentFunction(lastFunc); |
| 1935 | FunctionEnd((*str)->pos); |
| 1936 | CodeInfo::nodeList.pop_back(); |
| 1937 | |
| 1938 | TypeStop(); |
| 1939 | |
| 1940 | NodeOneOP* wrap = new NodeOneOP(); |
| 1941 | wrap->SetFirstNode(getPointer); |
| 1942 | CodeInfo::nodeList.push_back(wrap); |
| 1943 | PrepareMemberCall((*str)->pos); |
| 1944 | AddMemberFunctionCall((*str)->pos, functionName, 0); |
| 1945 | AddTwoExpressionNode(resultType); |
| 1946 | } |
| 1947 | |
| 1948 | bool ParseTerminal(Lexeme** str) |
| 1949 | { |
no test coverage detected