Skip to content

Can't parse tuples starting with signed numbers #748

@nicolas-abril

Description

@nicolas-abril

Reproducing the behavior

Writing expressions like these in functional syntax:

foo = (+1, -1)
bar = (-2.1)
baz = (+3 -4) # parses, but to the wrong expression

All fail because the parser sees the operator and thinks that must be a numeric operation.

Instead, we'd like for signed numbers to have priority over number operations at the start of the parens group, just like we do for *.

System Settings

Bend commit 0ac443c

Additional context

No response

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