tree-sitter-julia
tree-sitter-julia copied to clipboard
Parse failure with block comment in struct definition
Source:
struct Foo
bar::Int
#= const =# ibaz::Int
end
Playground:
struct_definition [0, 0] - [3, 3]
name: identifier [0, 7] - [0, 10]
typed_expression [1, 4] - [2, 25]
typed_expression [1, 4] - [2, 20]
identifier [1, 4] - [1, 7]
ERROR [1, 9] - [1, 12]
identifier [1, 9] - [1, 12]
block_comment [2, 4] - [2, 15]
identifier [2, 16] - [2, 20]
identifier [2, 22] - [2, 25]
Note the i
in front of baz
-- I discovered this since my real member name started with i
. If I remove it the parser trips up at another location, which seems pretty weird, but not sure if it has some significance.
Source:
struct Foo
bar::Int
#= const =# baz::Int
end
Playground:
struct_definition [0, 0] - [3, 3]
name: identifier [0, 7] - [0, 10]
typed_expression [1, 4] - [2, 24]
typed_expression [1, 4] - [1, 12]
identifier [1, 4] - [1, 7]
identifier [1, 9] - [1, 12]
block_comment [2, 4] - [2, 15]
ERROR [2, 16] - [2, 19]
identifier [2, 16] - [2, 19]
identifier [2, 21] - [2, 24]