Skip to content

Errors for queries with imbalanced parentheses are reported only for too many left parentheses #547

Open
@isker

Description

@isker

Here are some input query strings and the results of parsing them, including the error, if any. Some of them should result in parse errors but do not.

( -> <nil> (query: missing close paren, got token <nil>)
(( -> <nil> (error parsing regexp: missing closing ): `((`)
((( -> <nil> (error parsing regexp: missing closing ): `(((`)
() -> TRUE (<nil>)
) -> TRUE (<nil>) # should error
)) -> TRUE (<nil>) # should error
))) -> TRUE (<nil>) # should error
foo -> substr:"foo" (<nil>)
foo) -> substr:"foo" (<nil>) # should error
foo)) -> substr:"foo" (<nil>) # should error
foo))) -> substr:"foo" (<nil>) # should error
(foo -> <nil> (error parsing regexp: missing closing ): `(foo`)
((foo -> <nil> (error parsing regexp: missing closing ): `((foo`)
(((foo -> <nil> (error parsing regexp: missing closing ): `(((foo`)
(foo) -> substr:"foo" (<nil>)
(foo)) -> substr:"foo" (<nil>) # should error
((foo)) -> substr:"foo" (<nil>)
(((foo)) -> <nil> (error parsing regexp: missing closing ): `(((foo))`)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions