Home
last modified time | relevance | path

Searched refs:consequent (Results 1 - 17 of 17) sorted by relevance

/arkcompiler/ets_frontend/ets2panda/util/ast-builders/
H A DswitchCaseStatementBuilder.h38 SwitchCaseStatementBuilder &SetConsequent(ArenaVector<Statement *> consequent) in SetConsequent() argument
40 consequent_ = std::move(consequent); in SetConsequent()
/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 DswitchCaseStatement.h36 explicit SwitchCaseStatement(Expression *test, ArenaVector<Statement *> &&consequent) in SwitchCaseStatement() argument
37 : Statement(AstNodeType::SWITCH_CASE_STATEMENT), test_(test), consequent_(std::move(consequent)) in SwitchCaseStatement()
H A DifStatement.h36 explicit IfStatement(Expression *test, Statement *consequent, Statement *alternate) in IfStatement() argument
39 consequent_(consequent), in IfStatement()
/arkcompiler/ets_frontend/ets2panda/ir/statements/
H A DifStatement.cpp59 {"consequent", consequent_}, in Dump()
116 auto *const consequent = consequent_->Clone(allocator, nullptr)->AsStatement(); in Clone() local
119 if (auto *const clone = allocator->New<IfStatement>(test, consequent, alternate); clone != nullptr) { in Clone()
125 consequent->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()
H A DswitchCaseStatement.h32 explicit SwitchCaseStatement(Expression *test, ArenaVector<Statement *> &&consequent) in SwitchCaseStatement() argument
33 : Statement(AstNodeType::SWITCH_CASE_STATEMENT), test_(test), consequent_(std::move(consequent)) in SwitchCaseStatement()
/arkcompiler/ets_frontend/ets2panda/ir/expressions/
H A DconditionalExpression.cpp53 {{"type", "ConditionalExpression"}, {"test", test_}, {"consequent", consequent_}, {"alternate", alternate_}}); in Dump()
99 auto *const consequent = consequent_->Clone(allocator, nullptr)->AsExpression(); in Clone() local
102 if (auto *const clone = allocator->New<ConditionalExpression>(test, consequent, alternate); clone != nullptr) { in Clone()
104 consequent->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.cpp973 void ParserImpl::ThrowIfBodyEmptyError([[maybe_unused]] ir::Statement *consequent) {} in ThrowIfBodyEmptyError() argument
993 ir::Statement *consequent = ParseStatement(StatementParsingFlags::IF_ELSE | StatementParsingFlags::ALLOW_LEXICAL); in ParseIfStatement() local
995 ThrowIfBodyEmptyError(consequent); in ParseIfStatement()
997 endLoc = consequent->End(); in ParseIfStatement()
1006 auto *ifStatement = AllocNode<ir::IfStatement>(test, consequent, alternate); in ParseIfStatement()
1113 ir::Statement *consequent = ParseStatement(StatementParsingFlags::ALLOW_LEXICAL); in ParseSwitchCaseStatement() local
1114 caseEndLoc = consequent->End(); in ParseSwitchCaseStatement()
1115 consequents.push_back(consequent); in ParseSwitchCaseStatement()
H A DTSparser.h141 void ThrowIfBodyEmptyError(ir::Statement *consequent) override;
H A DparserImpl.h386 virtual void ThrowIfBodyEmptyError(ir::Statement *consequent);
H A DTSparser.cpp2172 void TSParser::ThrowIfBodyEmptyError(ir::Statement *consequent) in ThrowIfBodyEmptyError() argument
2174 if (consequent->IsEmptyStatement()) { in ThrowIfBodyEmptyError()
H A DexpressionParser.cpp578 ir::Expression *consequent = ParseExpression(); in ParseAssignmentExpression() local
587 auto *conditionalExpr = AllocNode<ir::ConditionalExpression>(lhsExpression, consequent, alternate); in ParseAssignmentExpression()
/arkcompiler/ets_frontend/ets2panda/checker/
H A DETSAnalyzer.cpp1249 auto *consequent = expr->Consequent(); in Check() local
1250 auto *consequentType = consequent->Check(checker); in Check()
1253 consequent->SetBoxingUnboxingFlags(ir::BoxingUnboxingFlags::BOX_TO_ENUM); in Check()
1273 // Here we need to combine types from consequent and alternate if blocks. in Check()
1283 } else if (consequent->IsNumberLiteral() && in Check()
1284 checker->AdjustNumberLiteralType(consequent->AsNumberLiteral(), consequentType, alternateType)) { in Check()
2221 // Here we need to restore types from consequent if block. in Check()
2228 // Here we need to combine types from consequent and alternate if blocks. in Check()
2233 // Here we need to combine types from consequent if block and initial. in Check()
/arkcompiler/ets_frontend/es2panda/parser/
H A DstatementParser.cpp1643 ir::Statement *consequent = ParseStatement(StatementParsingFlags::IF_ELSE); in ParseIfStatement() local
1645 if (Extension() == ScriptExtension::TS && consequent->IsEmptyStatement()) { in ParseIfStatement()
1649 endLoc = consequent->End(); in ParseIfStatement()
1658 auto *ifStatement = AllocNode<ir::IfStatement>(test, consequent, alternate); in ParseIfStatement()
1771 ir::Statement *consequent = ParseStatement(StatementParsingFlags::ALLOW_LEXICAL); in ParseSwitchCaseStatement() local
1772 caseEndLoc = consequent->End(); in ParseSwitchCaseStatement()
1773 consequents.push_back(consequent); in ParseSwitchCaseStatement()
H A DexpressionParser.cpp758 ir::Expression *consequent = ParseExpression(); in ParseAssignmentExpression() local
767 auto *conditionalExpr = AllocNode<ir::ConditionalExpression>(lhsExpression, consequent, alternate); in ParseAssignmentExpression()

Completed in 27 milliseconds