MCPcopy Create free account
hub / github.com/anjo76/angelscript / ParseDataType

Method ParseDataType

sdk/angelscript/source/as_builder.cpp:1096–1119  ·  view source on GitHub ↗

Called from module and engine

Source from the content-addressed store, hash-verified

1094
1095// Called from module and engine
1096int asCBuilder::ParseDataType(const char *datatype, asCDataType *result, asSNameSpace *implicitNamespace, bool isReturnType)
1097{
1098 Reset();
1099
1100 asCScriptCode source;
1101 source.SetCode("", datatype, true);
1102
1103 asCParser parser(this);
1104 int r = parser.ParseDataType(&source, isReturnType);
1105 if( r < 0 )
1106 return asINVALID_TYPE;
1107
1108 // Get data type and property name
1109 asCScriptNode *dataType = parser.GetScriptNode()->firstChild;
1110
1111 *result = CreateDataTypeFromNode(dataType, &source, implicitNamespace, true);
1112 if( isReturnType )
1113 *result = ModifyDataTypeFromNode(*result, dataType->next, &source, 0, 0);
1114
1115 if( numErrors > 0 )
1116 return asINVALID_TYPE;
1117
1118 return asSUCCESS;
1119}
1120
1121int asCBuilder::ParseTemplateDecl(const char *decl, asCString *name, asCArray<asCString> &subtypeNames)
1122{

Callers

nothing calls this directly

Calls 2

SetCodeMethod · 0.80
GetScriptNodeMethod · 0.80

Tested by

no test coverage detected