Berry print "a" syntax no longer supported (#21048)

This commit is contained in:
s-hadinger 2024-03-27 16:22:27 +01:00 committed by GitHub
parent b50d613360
commit aa4bdebe55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 27 deletions

View File

@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.
- Too restrictive checksum checks in Lib_teleinfo (#21033)
### Removed
- Berry `print "a"` syntax no longer supported
## [13.4.0.2] 20240318

View File

@ -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);
@ -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;
}