Revert "fix: catch function call without keyword with parenscheck"

This reverts commit 4bf63454f4f8daa2f438898b6396fec6e4ad1a36.
This commit is contained in:
Gleb Koval 2025-02-07 17:13:06 +00:00
parent 2ff7fff7eb
commit 4631f4370e
Signed by: cyclane
GPG Key ID: 15E168A8B332382C

View File

@ -13,7 +13,6 @@ import cats.data.NonEmptyList
import parsley.errors.DefaultErrorBuilder
import parsley.errors.ErrorBuilder
import parsley.errors.tokenextractors.LexToken
import parsley.character.char
object parser {
import lexer.implicits.implicitSymbol
@ -50,9 +49,6 @@ object parser {
case Expr
case Pair
val _parensCheck =
char('(').verifiedExplain("functions can only be called using 'call' keyword")
implicit val builder: ErrorBuilder[String] = new DefaultErrorBuilder with LexToken {
def tokens = errTokens
}
@ -71,8 +67,8 @@ object parser {
GreaterEq from ">="
) +:
SOps(InfixL)(
((Add from "+").label("binary operator") | _parensCheck),
((Sub from "-").label("binary operator") | _parensCheck)
(Add from "+").label("binary operator"),
(Sub from "-").label("binary operator")
) +:
SOps(InfixL)(Mul from "*", Div from "/", Mod from "%") +:
SOps(Prefix)(