| 1572 | } |
| 1573 | |
| 1574 | UHDM::expr* ElaborationStep::exprFromAssign_(DesignComponent* component, |
| 1575 | const FileContent* fC, NodeId id, |
| 1576 | NodeId unpackedDimension, |
| 1577 | ModuleInstance* instance) { |
| 1578 | // Assignment section |
| 1579 | NodeId assignment; |
| 1580 | NodeId Assign = fC->Sibling(id); |
| 1581 | if (Assign && (fC->Type(Assign) == VObjectType::paExpression)) { |
| 1582 | assignment = Assign; |
| 1583 | } |
| 1584 | if (unpackedDimension) { |
| 1585 | NodeId tmp = unpackedDimension; |
| 1586 | while ((fC->Type(tmp) == VObjectType::paUnpacked_dimension) || |
| 1587 | (fC->Type(tmp) == VObjectType::paVariable_dimension)) { |
| 1588 | tmp = fC->Sibling(tmp); |
| 1589 | } |
| 1590 | if (tmp && (fC->Type(tmp) != VObjectType::paUnpacked_dimension) && |
| 1591 | (fC->Type(tmp) != VObjectType::paVariable_dimension)) { |
| 1592 | assignment = tmp; |
| 1593 | } |
| 1594 | } |
| 1595 | |
| 1596 | NodeId expression; |
| 1597 | if (assignment) { |
| 1598 | if (fC->Type(assignment) == VObjectType::paClass_new) { |
| 1599 | expression = assignment; |
| 1600 | } else { |
| 1601 | NodeId Primary = fC->Child(assignment); |
| 1602 | if (fC->Type(assignment) == VObjectType::paExpression) { |
| 1603 | Primary = assignment; |
| 1604 | } |
| 1605 | expression = Primary; |
| 1606 | } |
| 1607 | } else { |
| 1608 | expression = fC->Sibling(id); |
| 1609 | if ((fC->Type(expression) != VObjectType::paExpression) && |
| 1610 | (fC->Type(expression) != VObjectType::paConstant_expression)) |
| 1611 | expression = InvalidNodeId; |
| 1612 | } |
| 1613 | |
| 1614 | expr* exp = nullptr; |
| 1615 | if (expression) { |
| 1616 | exp = (expr*)m_helper.compileExpression(component, fC, expression, |
| 1617 | m_compileDesign, Reduce::No, |
| 1618 | nullptr, instance); |
| 1619 | } |
| 1620 | return exp; |
| 1621 | } |
| 1622 | |
| 1623 | UHDM::typespec* ElaborationStep::elabTypeParameter_(DesignComponent* component, |
| 1624 | Parameter* sit, |
nothing calls this directly
no test coverage detected