82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
{
DiagnosticsManager::GetInstance().emitSyntaxErrorMessage( locationId,
"expected an expression.", 0 );
context.env()->storeValue( localIdentity, ANYTERM( _ ), ValueToEIR( PoisonValue() ) );
return true;
}
context.env()->storeValue( localIdentity, ANYTERM( _ ), ValueToEIR( *np.popValue() ) );
return true;
};
RegisterRule( e, "using"_sid, Rule( handleUsing ) );
}
}
|
>
>
>
>
>
|
>
>
>
>
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
{
DiagnosticsManager::GetInstance().emitSyntaxErrorMessage( locationId,
"expected an expression.", 0 );
context.env()->storeValue( localIdentity, ANYTERM( _ ), ValueToEIR( PoisonValue() ) );
return true;
}
auto val = np.popValue();
if( !val->isConstant() )
{
DiagnosticsManager::GetInstance().emitSyntaxErrorMessage( val->locationId(),
"this expression is not a comptime constant.", 0 );
context.env()->storeValue( localIdentity, ANYTERM( _ ), ValueToEIR( PoisonValue() ) );
return true;
}
context.env()->storeValue( localIdentity, ANYTERM( _ ), ValueToEIR( *val ) );
return true;
};
RegisterRule( e, "using"_sid, Rule( handleUsing ) );
}
}
|