Skip to content

bug: highlight broken with decorators #283

Closed
@sinelnikov-web

Description

@sinelnikov-web

Did you check existing issues?

  • I have read all the tree-sitter docs if it relates to using the parser
  • I have searched the existing issues of tree-sitter-typescript

Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)

0.20.8

Describe the bug

When you specify generic type in decorator, it's break the highlight of code below

Broken
image

Normal
image

Steps To Reproduce/Bad Parse Tree

  1. Create a calss
  2. Declare a method in this class
  3. Decorate this method
  4. Pass generic type in decorator

Expected Behavior/Parse Tree

Syntax highlight will work well

Repro

function system<A>(...args: any): any {}

export default class bSrchCard   {
	@system()
	override readonly analyticsParams = {};

	@system()
	override readonly analyticsOptions = {};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions