MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / ParseDataType

Method ParseDataType

src/server/angelscript/angelscript/source/as_parser.cpp:152–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152int asCParser::ParseDataType(asCScriptCode *in_script, bool in_isReturnType)
153{
154 Reset();
155
156 this->script = in_script;
157
158 scriptNode = CreateNode(snDataType);
159 if( scriptNode == 0 ) return -1;
160
161 scriptNode->AddChildLast(ParseType(true));
162 if( isSyntaxError ) return -1;
163
164 if( in_isReturnType )
165 {
166 scriptNode->AddChildLast(ParseTypeMod(false));
167 if( isSyntaxError ) return -1;
168 }
169
170 // The declaration should end after the type
171 sToken t;
172 GetToken(&t);
173 if( t.type != ttEnd )
174 {
175 Error(ExpectedToken(asCTokenizer::GetDefinition(ttEnd)), &t);
176 Error(InsteadFound(t), &t);
177 return -1;
178 }
179
180 if( errorWhileParsing )
181 return -1;
182
183 return 0;
184}
185
186
187// Parse a template declaration: IDENTIFIER '<' 'class'? IDENTIFIER '>'

Callers 14

RegisterInterfaceMethod · 0.45
RegisterObjectMethodMethod · 0.45
RegisterStringFactoryMethod · 0.45
GetTypeInfoByDeclMethod · 0.45
GetTypeIdByDeclMethod · 0.45
RegisterEnumMethod · 0.45
RegisterEnumValueMethod · 0.45

Calls 6

AddChildLastMethod · 0.80
AssignMethod · 0.80
SetTokenMethod · 0.80
UpdateSourcePosMethod · 0.80
FormatMethod · 0.45
AddressOfMethod · 0.45

Tested by

no test coverage detected