Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Go] preliminary support for Go 1.18 (#3289)
* [Go] improve comments * Convert anon to named contexts for compatibility with overrides. * Avoid false positives when scoping javadoc bullets. * Use `prototype` to reduce repetition. * [Go] preliminary support for Go 1.18 Features: * [x] Support for ~. * [x] Support for `any` and `comparable`. * [x] Support for type unions. * [x] Support for general interfaces (with type unions). * [x] Support for type parameters in generic functions. * [x] Support for type parameters in method receivers of generic types. * [x] Support for type arguments following type names. * [x] Support for type parameters in type declarations. * [x] Support for embedded parametrized types in struct definitions. * [x] Support for type arguments between function name and function arguments. * [x] Support for `invalid.illegal` for dangling `)]}`. * [x] Slightly better meta scopes in type definitions. Known regressions: * Embedded interfaces are no longer scoped as "inherited class", due to ambiguities. * "Namespace" idents such as `ident.` no longer support a comment between identifier and dot. * Last ident in parens followed by opening paren is no longer scoped as a function call, due to false positives and ambiguities. Known issues and limitations: * Detection of type parameter lists and type argument lists is incomplete. In some places it relies on regex lookahead, which doesn't work across multiple lines. There are also edge case ambiguities which are supported by the Go compiler but not by our syntax. * [Go] use `comment.line.double-slash` convention * [Go] use `string.quoted.backtick` convention * [Go] more consistent line terminators * [Go] support folding of block comments Co-authored-by: deathaxe <deathaxe@web.de>
- Loading branch information