1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-08 18:14:21 +03:00
inform7/inter/inter-module/Chapter 4/The Nop Construct.w
2019-07-12 11:33:52 +01:00

29 lines
743 B
OpenEdge ABL

[Inter::Nop::] The Nop Construct.
Defining the nop construct.
@
@e NOP_IST
=
void Inter::Nop::define(void) {
inter_construct *IC = Inter::Defn::create_construct(
NOP_IST, NULL,
I"nop", I"nops");
IC->usage_permissions = OUTSIDE_OF_PACKAGES + INSIDE_PLAIN_PACKAGE + INSIDE_CODE_PACKAGE;
}
inter_error_message *Inter::Nop::new(inter_reading_state *IRS, inter_t level, inter_error_location *eloc) {
inter_frame P = Inter::Frame::fill_0(IRS, NOP_IST, eloc, level);
inter_error_message *E = Inter::Defn::verify_construct(IRS->current_package, P);
if (E) return E;
Inter::Frame::insert(P, IRS);
return NULL;
}
inter_error_message *Inter::Nop::nop_out(inter_repository *I, inter_frame P) {
P.data[ID_IFLD] = NOP_IST;
return NULL;
}