Parse a template declaration: IDENTIFIER '<' 'class'? IDENTIFIER {, 'class'? IDENTIFIER} '>'
| 185 | |
| 186 | // Parse a template declaration: IDENTIFIER '<' 'class'? IDENTIFIER {, 'class'? IDENTIFIER} '>' |
| 187 | int asCParser::ParseTemplateDecl(asCScriptCode *in_script) |
| 188 | { |
| 189 | Reset(); |
| 190 | |
| 191 | this->script = in_script; |
| 192 | scriptNode = CreateNode(snUndefined); |
| 193 | if( scriptNode == 0 ) return -1; |
| 194 | |
| 195 | scriptNode->AddChildLast(ParseIdentifier()); |
| 196 | if( isSyntaxError ) return -1; |
| 197 | |
| 198 | ParseTemplateDeclTypeList(scriptNode, true); |
| 199 | if (isSyntaxError) return -1; |
| 200 | |
| 201 | sToken t; |
| 202 | GetToken(&t); |
| 203 | if( t.type != ttEnd ) |
| 204 | { |
| 205 | Error(ExpectedToken(asCTokenizer::GetDefinition(ttEnd)), &t); |
| 206 | Error(InsteadFound(t), &t); |
| 207 | return -1; |
| 208 | } |
| 209 | |
| 210 | if( errorWhileParsing ) |
| 211 | return -1; |
| 212 | |
| 213 | return 0; |
| 214 | } |
| 215 | |
| 216 | int asCParser::ParsePropertyDeclaration(asCScriptCode *in_script) |
| 217 | { |
no test coverage detected