tree-sitter / tree-sitter-julia

Julia grammar for Tree-sitter
MIT License
93 stars 32 forks source link

Parse error parsing function definition without a named argument #57

Closed fredrikekre closed 1 year ago

fredrikekre commented 1 year ago

Source:

function foo(::Int)
end

Playground:

function_definition [0, 0] - [1, 3]
  name: identifier [0, 9] - [0, 12]
  parameters: parameter_list [0, 12] - [0, 19]
    ERROR [0, 13] - [0, 15]
    identifier [0, 15] - [0, 18]

Note that it works correctly for short form definitions (foo(::Int) = nothing).