Skip to content

Bug parsing exception spec in catch #105

@c42f

Description

@c42f

Spotted by @BenChung

julia> itest_parse(JuliaSyntax.parse_expr, "try 3 catch e+3 end")
# Code:
try 3 catch e+3 end

# Green tree:
     1:19     │[try]
     1:3try                        "try"
     4:5      │  [block]
     4:4      │    Whitespace               " "
     5:5      │    Integer              ✔   "3"
     6:6      │  Whitespace                 " "
     7:11catch                      "catch"
    12:12     │  Whitespace                 " "
    13:13     │  Identifier             ✔   "e"
    14:15     │  [block]
    14:15     │    Integer              ✔   "+3"
    16:16     │  Whitespace                 " "
    17:16false""
    17:16false""
    17:19end                        "end"

Whereas the reference parser provides the error invalid syntax "catch (e + 3)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions