Skip to content

Commit

Permalink
REVERT Parsing, re issue #600
Browse files Browse the repository at this point in the history
  • Loading branch information
infradig committed Oct 3, 2024
1 parent f10e278 commit 4c5f7af
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -2799,30 +2799,30 @@ char *eat_space(parser *p)

static bool check_space_before_function(parser *p, int ch, const char *src)
{
if (!iswspace(ch))
return true;

p->srcptr = (char*)src;
if (iswspace(ch) && SB_strcmp(p->token, ".")) {
p->srcptr = (char*)src;
//src = eat_space(p);

while (iswblank(*src))
src++;
while (iswblank(*src))
src++;

if (!src || !*src) {
if (DUMP_ERRS || !p->do_read_term)
fprintf(stdout, "Error: syntax error, incomplete statement, %s:%d\n", get_loaded(p->m, p->m->filename), p->line_nbr);
if (!src || !*src) {
if (DUMP_ERRS || !p->do_read_term)
fprintf(stdout, "Error: syntax error, incomplete statement, %s:%d\n", get_loaded(p->m, p->m->filename), p->line_nbr);

p->error_desc = "incomplete_statement";
p->error = true;
return false;
}
p->error_desc = "incomplete_statement";
p->error = true;
return false;
}

if ((!p->is_op || p->is_quoted) && (*src == '(')) {
if (DUMP_ERRS || !p->do_read_term)
fprintf(stdout, "Error: syntax error, operator expected before parens, %s:%d\n", get_loaded(p->m, p->m->filename), p->line_nbr);
if (!p->is_op && (*src == '(')) {
if (DUMP_ERRS || !p->do_read_term)
fprintf(stdout, "Error: syntax error, operator expected before parens, %s:%d\n", get_loaded(p->m, p->m->filename), p->line_nbr);

p->error_desc = "operator_expected";
p->error = true;
return false;
p->error_desc = "operator_expected";
p->error = true;
return false;
}
}

return true;
Expand Down

0 comments on commit 4c5f7af

Please sign in to comment.