| 90 | } |
| 91 | |
| 92 | void ScriptTranslator::processNode(ScriptCompiler *compiler, const AbstractNodePtr &node) |
| 93 | { |
| 94 | if(node->type != ANT_OBJECT) |
| 95 | return; |
| 96 | |
| 97 | // Abstract objects are completely skipped |
| 98 | if((static_cast<ObjectAbstractNode*>(node.get()))->abstract) |
| 99 | return; |
| 100 | |
| 101 | // Retrieve the translator to use |
| 102 | ScriptTranslator *translator = |
| 103 | ScriptCompilerManager::getSingleton().getTranslator(node); |
| 104 | |
| 105 | if(translator) |
| 106 | translator->translate(compiler, node); |
| 107 | else |
| 108 | compiler->addError(ScriptCompiler::CE_UNEXPECTEDTOKEN, node->file, node->line, |
| 109 | "token \"" + static_cast<ObjectAbstractNode*>(node.get())->cls + "\" is not recognized"); |
| 110 | } |
| 111 | //------------------------------------------------------------------------- |
| 112 | AbstractNodeList::const_iterator ScriptTranslator::getNodeAt(const AbstractNodeList &nodes, int index) |
| 113 | { |
nothing calls this directly
no test coverage detected