Revert "fix: catch function call without keyword with parenscheck"
This reverts commit 4bf63454f4f8daa2f438898b6396fec6e4ad1a36.
This commit is contained in:
parent
2ff7fff7eb
commit
4631f4370e
@ -13,7 +13,6 @@ import cats.data.NonEmptyList
|
|||||||
import parsley.errors.DefaultErrorBuilder
|
import parsley.errors.DefaultErrorBuilder
|
||||||
import parsley.errors.ErrorBuilder
|
import parsley.errors.ErrorBuilder
|
||||||
import parsley.errors.tokenextractors.LexToken
|
import parsley.errors.tokenextractors.LexToken
|
||||||
import parsley.character.char
|
|
||||||
|
|
||||||
object parser {
|
object parser {
|
||||||
import lexer.implicits.implicitSymbol
|
import lexer.implicits.implicitSymbol
|
||||||
@ -50,9 +49,6 @@ object parser {
|
|||||||
case Expr
|
case Expr
|
||||||
case Pair
|
case Pair
|
||||||
|
|
||||||
val _parensCheck =
|
|
||||||
char('(').verifiedExplain("functions can only be called using 'call' keyword")
|
|
||||||
|
|
||||||
implicit val builder: ErrorBuilder[String] = new DefaultErrorBuilder with LexToken {
|
implicit val builder: ErrorBuilder[String] = new DefaultErrorBuilder with LexToken {
|
||||||
def tokens = errTokens
|
def tokens = errTokens
|
||||||
}
|
}
|
||||||
@ -71,8 +67,8 @@ object parser {
|
|||||||
GreaterEq from ">="
|
GreaterEq from ">="
|
||||||
) +:
|
) +:
|
||||||
SOps(InfixL)(
|
SOps(InfixL)(
|
||||||
((Add from "+").label("binary operator") | _parensCheck),
|
(Add from "+").label("binary operator"),
|
||||||
((Sub from "-").label("binary operator") | _parensCheck)
|
(Sub from "-").label("binary operator")
|
||||||
) +:
|
) +:
|
||||||
SOps(InfixL)(Mul from "*", Div from "/", Mod from "%") +:
|
SOps(InfixL)(Mul from "*", Div from "/", Mod from "%") +:
|
||||||
SOps(Prefix)(
|
SOps(Prefix)(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user