From b5cac6dc3d2a7129dacbdaf27097657b62ad4ca6 Mon Sep 17 00:00:00 2001 From: David Schmenk Date: Sat, 12 Aug 2017 16:28:29 -0700 Subject: [PATCH] Quick hack to flag var: and var=> without follow-on value as error --- src/toolsrc/parse.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/toolsrc/parse.c b/src/toolsrc/parse.c index 548e5f2..b9ac3ca 100755 --- a/src/toolsrc/parse.c +++ b/src/toolsrc/parse.c @@ -584,6 +584,11 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth) type = (scantoken == PTRB_TOKEN) ? BPTR_TYPE : WPTR_TYPE; if (!parse_const(&const_offset)) { + if (scantoken == EOL_TOKEN || scantoken == CLOSE_PAREN_TOKEN) + { + parse_error("Syntax"); + return (NULL); + } /* * Setting type override for following operations */ @@ -618,6 +623,11 @@ t_opseq *parse_value(t_opseq *codeseq, int rvalue, int *stackdepth) : ((scantoken == DOT_TOKEN) ? BPTR_TYPE : WPTR_TYPE); if (!parse_const(&const_offset)) { + if (scantoken == EOL_TOKEN || scantoken == CLOSE_PAREN_TOKEN) + { + parse_error("Syntax"); + return (NULL); + } /* * Setting type override for following operations */