Skip to content

Commit

Permalink
Merge pull request #413 from s-hadinger/remove_obsolete_parsing
Browse files Browse the repository at this point in the history
Remove left-over parsing of strings
  • Loading branch information
skiars authored Apr 12, 2024
2 parents 3287584 + 92ae6c2 commit 5c4297b
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/be_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,30 +918,6 @@ static void primary_expr(bparser *parser, bexpdesc *e)
}
}

/* parse a single string literal as parameter */
static void call_single_string_expr(bparser *parser, bexpdesc *e)
{
bexpdesc arg;
bfuncinfo *finfo = parser->finfo;
int base;

/* func 'string_literal' */
check_var(parser, e);
if (e->type == ETMEMBER) {
push_error(parser, "method not allowed for string prefix");
}

base = be_code_nextreg(finfo, e); /* allocate a new base reg if not at top already */
simple_expr(parser, &arg);
be_code_nextreg(finfo, &arg); /* move result to next reg */

be_code_call(finfo, base, 1); /* only one arg */
if (e->type != ETREG) {
e->type = ETREG;
e->v.idx = base;
}
}

static void suffix_expr(bparser *parser, bexpdesc *e)
{
primary_expr(parser, e);
Expand All @@ -956,9 +932,6 @@ static void suffix_expr(bparser *parser, bexpdesc *e)
case OptLSB: /* '[' index */
index_expr(parser, e);
break;
case TokenString:
call_single_string_expr(parser, e); /* " string literal */
break;
default:
return;
}
Expand Down

0 comments on commit 5c4297b

Please sign in to comment.