languages: Add inline values support for JavaScript, TypeScript, and TSX (#40914)

Adds debugger inline values support for JavaScript, TypeScript, and TSX languages. 

Release Notes:

- debugger: Add inline value support for Javascript, TypeScript, and TSX

---------

Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
phpjit
2025-10-25 22:51:59 +00:00
committed by GitHub
co-authored by Anthony
parent ef306245e0
commit b7cc597d28
4 changed files with 329 additions and 1 deletions
@@ -0,0 +1,23 @@
(lexical_declaration (variable_declarator name: (identifier) @debug-variable))
(for_in_statement left: (identifier) @debug-variable)
(for_statement initializer: (lexical_declaration (variable_declarator name: (identifier) @debug-variable)))
(binary_expression left: (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(binary_expression right: (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(unary_expression argument: (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(update_expression argument: (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(return_statement (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(parenthesized_expression (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(array (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(pair value: (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(member_expression object: (identifier) @debug-variable (#not-match? @debug-variable "^[A-Z]"))
(statement_block) @debug-scope
(program) @debug-scope