X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Fexpressp.c;h=5b3c0a714f99104d565625a5450fe06fe8ab0018;hb=d8d68d0bd4c45af6f0dc69b4fc33d37d961aca85;hp=c5f79bcfff89b5c2c7d3dfb344f1363acc6e0250;hpb=e536ce9e39cc1bfa82ecd1d6d73f874af655f9db;p=inform.git diff --git a/src/expressp.c b/src/expressp.c index c5f79bc..5b3c0a7 100644 --- a/src/expressp.c +++ b/src/expressp.c @@ -1,9 +1,8 @@ /* ------------------------------------------------------------------------- */ /* "expressp" : The expression parser */ /* */ -/* Copyright (c) Graham Nelson 1993 - 2020 */ -/* */ -/* This file is part of Inform. */ +/* Part of Inform 6.35 */ +/* copyright (c) Graham Nelson 1993 - 2021 */ /* */ /* Inform is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ @@ -68,6 +67,7 @@ static int comma_allowed, arrow_allowed, superclass_allowed, extern int *variable_usage; +/* Must be at least as many as keyword_group system_functions (currently 12) */ int system_function_usage[32]; static int get_next_etoken(void) @@ -817,7 +817,7 @@ static int evaluate_term(token_data t, assembly_operand *o) o->type = LONG_CONSTANT_OT; else o->type = CONSTANT_OT; - o->value = compile_string(t.text, FALSE, FALSE); + o->value = compile_string(t.text, STRCTX_GAME); return(TRUE); case VARIABLE_TT: if (!glulx_mode) { @@ -1465,11 +1465,15 @@ static void check_property_operator(int from_node) if ((below != -1) && (ET[below].right != -1)) { int n = ET[below].right, flag = FALSE; + /* Can we handle this dot operator as a native @get_prop (etc) + opcode? Only if we recognize the property value as a declared + common property constant. */ if ((ET[n].down == -1) && ((ET[n].value.type == LONG_CONSTANT_OT) || (ET[n].value.type == SHORT_CONSTANT_OT)) && ((ET[n].value.value > 0) && (ET[n].value.value < 64)) - && ((!module_switch) || (ET[n].value.marker == 0))) + && (!module_switch) + && (ET[n].value.marker == 0)) flag = TRUE; if (!flag)