mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
chore: add test for ecma private fields & methods
This commit is contained in:
parent
801c7f0b48
commit
bbbb2f1f32
1 changed files with 25 additions and 0 deletions
25
tests/query/highlights/ecma/test.ts
Normal file
25
tests/query/highlights/ecma/test.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
class H {
|
||||
pub_field = "Hello";
|
||||
// ^ property
|
||||
|
||||
#priv_field = "World!";
|
||||
// ^ property
|
||||
|
||||
#private_method() {
|
||||
// ^ method
|
||||
return `${this.pub_field} -- ${this.#priv_field}`;
|
||||
// ^ property
|
||||
// ^ property
|
||||
}
|
||||
|
||||
public_method() {
|
||||
// ^ method
|
||||
return this.#private_method();
|
||||
// ^ method
|
||||
}
|
||||
|
||||
ok() {
|
||||
return this.public_method();
|
||||
// ^ method
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue