Skip to content

Instantly share code, notes, and snippets.

@johannesrld
Last active May 13, 2024 09:36
Show Gist options
  • Save johannesrld/f21682c2d2a3e697f19e6e0363fdb805 to your computer and use it in GitHub Desktop.
Save johannesrld/f21682c2d2a3e697f19e6e0363fdb805 to your computer and use it in GitHub Desktop.
updated queries
(program
(comment)?
.
(expression_statement
.
(string
(string_fragment) @keyword.directive
(#eq? @keyword.directive "use strict"))))
(function_declaration
body:
(statement_block
(comment)?
.
(expression_statement
(string
(string_fragment) @keyword.directive
(#eq? @keyword.directive "use strict")))))
(arrow_function
body:
(statement_block
(comment)?
.
(expression_statement
(string
(string_fragment) @keyword.directive
(#eq? @keyword.directive "use strict")))))
(function_expression
body: (statement_block
(comment)?
.
(expression_statement
(string
(string_fragment) @keyword.directive
(#eq? @keyword.directive "use strict")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment