Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MISSING node appears in a valid type declaration #163

Open
bhaible opened this issue Feb 8, 2025 · 0 comments
Open

MISSING node appears in a valid type declaration #163

bhaible opened this issue Feb 8, 2025 · 0 comments

Comments

@bhaible
Copy link

bhaible commented Feb 8, 2025

This file t.go

package main

type ( Alias1 = bool
       Alias2 = int )

func main() {
}

is apparently valid: go run t.go successfully executes it (golang version 1.22.2). But tree-sitter-go 0.23.4 produces this syntax tree:

(source_file
  (package_clause (package_identifier))
  (type_declaration
    (type_alias name: (type_identifier) type: (type_identifier))
    (type_alias name: (type_identifier) type: (type_identifier))
    (MISSING "source_file_token1"))
  (function_declaration name: (identifier) parameters: (parameter_list) body: (block)))

Since the file is valid, I would expect no MISSING node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant