| 140 | } |
| 141 | |
| 142 | void fxCheckFunction(txParser* parser) |
| 143 | { |
| 144 | txNode* node = parser->root; |
| 145 | if (node->description->token == XS_TOKEN_PROGRAM) { |
| 146 | node = ((txProgramNode*)node)->body; |
| 147 | if (node->description->token == XS_TOKEN_STATEMENT) { |
| 148 | node = ((txStatementNode*)node)->expression; |
| 149 | if (node->description->token == XS_TOKEN_EXPRESSIONS) { |
| 150 | txNodeList* list = ((txExpressionsNode*)node)->items; |
| 151 | if (list->length == 1) { |
| 152 | node = list->first; |
| 153 | if (node->description->token == XS_TOKEN_FUNCTION) |
| 154 | return; |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | fxReportParserError(parser, node->line, "no function"); |
| 160 | } |
| 161 | |
| 162 | void fxCheckGenerator(txParser* parser) |
| 163 | { |
no test coverage detected