Skip to content

Commit e59e2bd

Browse files
committed
remove wrong syntax check from parser
1 parent 79a7c6c commit e59e2bd

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

classes/local/parser.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -364,17 +364,6 @@ private function parse_general_expression(?int $stopat = null): expression {
364364
$this->die(get_string('error_invalidrangesep', 'qtype_formulas'), $nexttoken);
365365
}
366366

367-
// We do not allow to a closing paren immediately after an opening paren of the same type.
368-
$openingparen = ($type & token::ANY_OPENING_PAREN);
369-
$nextclosing = ($nexttype & token::ANY_CLOSING_PAREN);
370-
if ($openingparen && $nextclosing) {
371-
$a = (object)[
372-
'open' => $value,
373-
'close' => $nextvalue,
374-
];
375-
$this->die(get_string('error_emptyparens', 'qtype_formulas', $a), $nexttoken);
376-
}
377-
378367
// If we're one token away from the end of the statement, we just read and discard the end-of-statement marker.
379368
if ($nexttype === token::END_OF_STATEMENT || $nexttype === token::END_GROUP) {
380369
$this->read_next();

0 commit comments

Comments
 (0)