| 233 | //========================================================================== |
| 234 | |
| 235 | static FxExpression *ResolveForDefault(FxIdentifier *expr, FxExpression*& object, PContainerType* objtype, FCompileContext &ctx) |
| 236 | { |
| 237 | |
| 238 | if (expr->Identifier == NAME_Default) |
| 239 | { |
| 240 | if (!isActor(objtype)) |
| 241 | { |
| 242 | expr->ScriptPosition.Message(MSG_ERROR, "'Default' requires an actor type."); |
| 243 | delete object; |
| 244 | object = nullptr; |
| 245 | return nullptr; |
| 246 | } |
| 247 | |
| 248 | FxExpression * x = new FxClassDefaults(object, expr->ScriptPosition); |
| 249 | object = nullptr; |
| 250 | delete expr; |
| 251 | return x->Resolve(ctx); |
| 252 | } |
| 253 | return expr; |
| 254 | } |
| 255 | |
| 256 | |
| 257 | //========================================================================== |