114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
ANYTERM( _ ), ValueToEIR( v ) );
} );
RegisterBuiltinFunc< Intrinsic< uint32_t ( string ) > >( e, "#Include"_sid,
[pEnv]( auto&& c, const Value& fnameval ) -> Value
{
execute::VM vm;
auto filename = FromValue< string >( Evaluate( fnameval, vm ) );
if( !filename )
{
DiagnosticsManager::GetInstance().emitErrorMessage( fnameval.locationId(),
"can't evaluate this to a string." );
return PoisonValue();
}
|
>
|
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
ANYTERM( _ ), ValueToEIR( v ) );
} );
RegisterBuiltinFunc< Intrinsic< uint32_t ( string ) > >( e, "#Include"_sid,
[pEnv]( auto&& c, const Value& fnameval ) -> Value
{
execute::VM vm;
auto fname = Evaluate( fnameval, vm );
auto filename = FromValue< string >( fname );
if( !filename )
{
DiagnosticsManager::GetInstance().emitErrorMessage( fnameval.locationId(),
"can't evaluate this to a string." );
return PoisonValue();
}
|