tree-sitter-julia icon indicating copy to clipboard operation
tree-sitter-julia copied to clipboard

Typed arrays literals (eg `Int[1,2,3]`)

Open FelipeLema opened this issue 4 years ago • 2 comments

I get a parsing error when feeding a typed array literal to emacs-tree-sitter

If I input

Float64[1, 2]

I get

((source_file
  (subscript_expression
   (identifier)
   (ERROR
    (number))
   (number)))
 . 75)

FelipeLema avatar Aug 27 '20 15:08 FelipeLema

This seems to be fixed.

source_file [0, 0] - [1, 0]
  subscript_expression [0, 0] - [0, 13]
    identifier [0, 0] - [0, 7]
    integer_literal [0, 8] - [0, 9]
    integer_literal [0, 11] - [0, 12]

ChrHorn avatar Jun 08 '22 09:06 ChrHorn

oh, I hadn't noticed... that's great.

would maintainers be willing to add this experssion to the tests? the more the merrier, right?

FelipeLema avatar Jun 08 '22 16:06 FelipeLema