Home
last modified time | relevance | path

Searched refs:alternate (Results 1 - 13 of 13) sorted by relevance

/arkcompiler/ets_frontend/ets2panda/ir/statements/
H A DifStatement.cpp60 {"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 DifStatement.h37 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 DconditionalExpressionBuilder.h41 ConditionalExpressionBuilder &SetAlternate(Expression *alternate) in SetAlternate() argument
43 alternate_ = alternate; in SetAlternate()
H A DifStatementBuilder.h41 IfStatementBuilder &SetAlternate(Statement *alternate) in SetAlternate() argument
43 alternate_ = alternate; in SetAlternate()
/arkcompiler/ets_frontend/es2panda/ir/expressions/
H A DconditionalExpression.h34 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 DifStatement.h36 explicit IfStatement(Expression *test, Statement *consequent, Statement *alternate) in IfStatement() argument
40 alternate_(alternate) in IfStatement()
/arkcompiler/ets_frontend/ets2panda/ir/expressions/
H A DconditionalExpression.cpp53 {{"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 DconditionalExpression.h35 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 DstatementParser.cpp998 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 DexpressionParser.cpp585 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 DETSAnalyzer.cpp1265 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 DexpressionParser.cpp765 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 DstatementParser.cpp1650 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()

Completed in 19 milliseconds