refactor: use Pratt's parser in {foreach} expressions

Closes #269