/arkcompiler/ets_frontend/ets2panda/ir/statements/ |
H A D | ifStatement.cpp | 60 {"alternate", AstDumper::Nullish(alternate_)}}); in Dump() 117 auto *const alternate = alternate_ != nullptr ? consequent_->Clone(allocator, nullptr)->AsStatement() : nullptr; in Clone() local 119 if (auto *const clone = allocator->New<IfStatement>(test, consequent, alternate); clone != nullptr) { in Clone() 126 if (alternate != nullptr) { in Clone() 127 alternate->SetParent(clone); in Clone()
|
H A D | ifStatement.h | 37 explicit IfStatement(Expression *test, Statement *consequent, Statement *alternate) in IfStatement() argument 38 : Statement(AstNodeType::IF_STATEMENT), test_(test), consequent_(consequent), alternate_(alternate) in IfStatement()
|
/arkcompiler/ets_frontend/ets2panda/util/ast-builders/ |
H A D | conditionalExpressionBuilder.h | 41 ConditionalExpressionBuilder &SetAlternate(Expression *alternate) in SetAlternate() argument 43 alternate_ = alternate; in SetAlternate()
|
H A D | ifStatementBuilder.h | 41 IfStatementBuilder &SetAlternate(Statement *alternate) in SetAlternate() argument 43 alternate_ = alternate; in SetAlternate()
|
/arkcompiler/ets_frontend/es2panda/ir/expressions/ |
H A D | conditionalExpression.h | 34 explicit ConditionalExpression(Expression *test, Expression *consequent, Expression *alternate) in ConditionalExpression() argument 35 : Expression(AstNodeType::CONDITIONAL_EXPRESSION), test_(test), consequent_(consequent), alternate_(alternate) in ConditionalExpression()
|
/arkcompiler/ets_frontend/es2panda/ir/statements/ |
H A D | ifStatement.h | 36 explicit IfStatement(Expression *test, Statement *consequent, Statement *alternate) in IfStatement() argument 40 alternate_(alternate) in IfStatement()
|
/arkcompiler/ets_frontend/ets2panda/ir/expressions/ |
H A D | conditionalExpression.cpp | 53 {{"type", "ConditionalExpression"}, {"test", test_}, {"consequent", consequent_}, {"alternate", alternate_}}); in Dump() 100 auto *const alternate = alternate_->Clone(allocator, nullptr)->AsExpression(); in Clone() local 102 if (auto *const clone = allocator->New<ConditionalExpression>(test, consequent, alternate); clone != nullptr) { in Clone() 105 alternate->SetParent(clone); in Clone()
|
H A D | conditionalExpression.h | 35 explicit ConditionalExpression(Expression *test, Expression *consequent, Expression *alternate) in ConditionalExpression() argument 36 : Expression(AstNodeType::CONDITIONAL_EXPRESSION), test_(test), consequent_(consequent), alternate_(alternate) in ConditionalExpression()
|
/arkcompiler/ets_frontend/ets2panda/parser/ |
H A D | statementParser.cpp | 998 ir::Statement *alternate = nullptr; in ParseIfStatement() local 1002 alternate = ParseStatement(StatementParsingFlags::IF_ELSE | StatementParsingFlags::ALLOW_LEXICAL); in ParseIfStatement() 1003 endLoc = alternate->End(); in ParseIfStatement() 1006 auto *ifStatement = AllocNode<ir::IfStatement>(test, consequent, alternate); in ParseIfStatement()
|
H A D | expressionParser.cpp | 585 ir::Expression *alternate = ParseExpression(); in ParseAssignmentExpression() local 587 auto *conditionalExpr = AllocNode<ir::ConditionalExpression>(lhsExpression, consequent, alternate); in ParseAssignmentExpression() 588 conditionalExpr->SetRange({lhsExpression->Start(), alternate->End()}); in ParseAssignmentExpression()
|
/arkcompiler/ets_frontend/ets2panda/checker/ |
H A D | ETSAnalyzer.cpp | 1265 auto *alternate = expr->Alternate(); in Check() local 1266 auto *alternateType = alternate->Check(checker); in Check() 1269 alternate->SetBoxingUnboxingFlags(ir::BoxingUnboxingFlags::BOX_TO_ENUM); in Check() 1273 // Here we need to combine types from consequent and alternate if blocks. in Check() 1280 if (alternate->IsNumberLiteral() && in Check() 1281 checker->AdjustNumberLiteralType(alternate->AsNumberLiteral(), alternateType, consequentType)) { in Check() 2208 // Apply the alternate smart casts in Check() 2228 // Here we need to combine types from consequent and alternate if blocks. in Check()
|
/arkcompiler/ets_frontend/es2panda/parser/ |
H A D | expressionParser.cpp | 765 ir::Expression *alternate = ParseExpression(); in ParseAssignmentExpression() local 767 auto *conditionalExpr = AllocNode<ir::ConditionalExpression>(lhsExpression, consequent, alternate); in ParseAssignmentExpression() 768 conditionalExpr->SetRange({lhsExpression->Start(), alternate->End()}); in ParseAssignmentExpression()
|
H A D | statementParser.cpp | 1650 ir::Statement *alternate = nullptr; in ParseIfStatement() local 1654 alternate = ParseStatement(StatementParsingFlags::IF_ELSE); in ParseIfStatement() 1655 endLoc = alternate->End(); in ParseIfStatement() 1658 auto *ifStatement = AllocNode<ir::IfStatement>(test, consequent, alternate); in ParseIfStatement()
|