MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / link

Method link

src/hx/cppia/Cppia.cpp:1719–1754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1717 }
1718 ExprType getType() HXCPP_OVERRIDE { return returnType; }
1719 CppiaExpr *link(CppiaModule &inModule) HXCPP_OVERRIDE
1720 {
1721 if (strlen(function.signature) != args.size()+1)
1722 throw "CallHaxe: Invalid arg count";
1723 for(int i=0;i<args.size()+1;i++)
1724 {
1725 switch(function.signature[i])
1726 {
1727 case sigInt: case sigBool: case sigFloat: case sigString: case sigObject:
1728 break; // Ok
1729 case sigVoid:
1730 if (i==0) // return void ok
1731 break;
1732 // fallthough
1733 default:
1734 throw "Bad haxe signature";
1735 }
1736 }
1737 switch(function.signature[0])
1738 {
1739 case sigBool:
1740 case sigInt:
1741 returnType = etInt; break;
1742 case sigFloat: returnType = etFloat; break;
1743 case sigString: returnType = etString; break;
1744 case sigObject: returnType = etObject; break;
1745 case sigVoid: returnType = etVoid; break;
1746 default: ;
1747 }
1748
1749 if (thisExpr)
1750 thisExpr = thisExpr->link(inModule);
1751 LinkExpressions(args,inModule);
1752
1753 return this;
1754 }
1755
1756
1757 bool isBoolInt() HXCPP_OVERRIDE { return function.signature[0]==sigBool; }

Callers

nothing calls this directly

Calls 3

LinkExpressionsFunction · 0.85
sizeMethod · 0.45
linkMethod · 0.45

Tested by

no test coverage detected