11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
void SetupIfStmt( Env& e )
{
auto handleIf = []( Parser& p, LocationId locationId, uint32_t prec )
{
auto& dm = DiagnosticsManager::GetInstance();
auto cfg = GetCFG( p.context() );
if( p.isInParenExpr() || !cfg )
{
dm.emitSyntaxErrorMessage( locationId, "the if statement is not allowed here.", 0 );
return false;
}
auto pPrecBB = cfg->currentBB();
|
|
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
void SetupIfStmt( Env& e )
{
auto handleIf = []( Parser& p, LocationId locationId, uint32_t prec )
{
auto& dm = DiagnosticsManager::GetInstance();
auto cfg = GetCFG( p.context() );
if( p.isInParenExpr() || !cfg || !IsBranchingAllowed( p.context() ) )
{
dm.emitSyntaxErrorMessage( locationId, "the if statement is not allowed here.", 0 );
return false;
}
auto pPrecBB = cfg->currentBB();
|