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

lazy variable declarations fail to parse

Open justin opened this issue 6 years ago • 0 comments

Example

public lazy var foo: String = {
   return "Foo"
}()

Result

(program [0, 0] - [3, 0]
  (variable_declaration [0, 0] - [1, 15]
    (modifier [0, 0] - [0, 6])
    (ERROR [0, 7] - [0, 11]
      (identifier [0, 7] - [0, 11]))
    name: (identifier [0, 16] - [0, 19])
    type: (type [0, 21] - [0, 27]
      (identifier [0, 21] - [0, 27]))
    value: (ERROR [0, 30] - [1, 9])
    value: (string [1, 10] - [1, 15]))
  (ERROR [2, 0] - [2, 3]))
parse_test.swift	0 ms	(ERROR [0, 7] - [0, 11])

justin avatar Oct 13 '19 16:10 justin