| 1341 | return true; |
| 1342 | } |
| 1343 | virtual RefPtr<ExpressionSyntaxNode> VisitVarExpression(VarExpressionSyntaxNode* expr) override |
| 1344 | { |
| 1345 | RefPtr<Object> refObj; |
| 1346 | if (expr->Tags.TryGetValue("ComponentReference", refObj)) |
| 1347 | { |
| 1348 | if (auto refComp = refObj.As<StringObject>()) |
| 1349 | { |
| 1350 | ILOperand * op; |
| 1351 | if (variables.TryGetValue(refComp->Content, op)) |
| 1352 | PushStack(op); |
| 1353 | else |
| 1354 | throw InvalidProgramException(String("referencing undefined component/variable '") + refComp->Content + "'. probable cause: unchecked circular reference."); |
| 1355 | } |
| 1356 | } |
| 1357 | else if (!GenerateVarRef(expr->Variable, expr->Access)) |
| 1358 | { |
| 1359 | throw InvalidProgramException("identifier is neither a variable nor a recognized component."); |
| 1360 | } |
| 1361 | return expr; |
| 1362 | } |
| 1363 | private: |
| 1364 | CodeGenerator & operator = (const CodeGenerator & other) = delete; |
| 1365 | public: |
nothing calls this directly
no test coverage detected