Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Mutating functions fail to parse #27

Open
justin opened this issue Oct 13, 2019 · 0 comments
Open

Mutating functions fail to parse #27

justin opened this issue Oct 13, 2019 · 0 comments

Comments

@justin
Copy link
Contributor

justin commented Oct 13, 2019

Example

mutating func foo(_ p1: Int) {}
public mutating func bar(_ p1: Int) {}

Result

(program [0, 0] - [2, 0]
  (ERROR [0, 0] - [1, 15]
    (identifier [0, 0] - [0, 8])
    (function_declaration [0, 9] - [0, 31]
      name: (identifier [0, 14] - [0, 17])
      (parameter_list [0, 17] - [0, 28]
        (parameter_declaration [0, 18] - [0, 27]
          (identifier [0, 20] - [0, 22])
          (type [0, 24] - [0, 27]
            (identifier [0, 24] - [0, 27])))))
    (ERROR [1, 0] - [1, 6]
      (modifier [1, 0] - [1, 6]))
    (identifier [1, 7] - [1, 15]))
  (function_declaration [1, 16] - [1, 38]
    name: (identifier [1, 21] - [1, 24])
    (parameter_list [1, 24] - [1, 35]
      (parameter_declaration [1, 25] - [1, 34]
        (identifier [1, 27] - [1, 29])
        (type [1, 31] - [1, 34]
          (identifier [1, 31] - [1, 34]))))))
parse_test.swift	0 ms	(ERROR [0, 0] - [1, 15])
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant