From 6e3a2e2a4ed1db995e718d11d1362ce3f271b714 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Thu, 16 Jun 2016 09:54:46 -0500 Subject: [PATCH] Add JavaScript language specific categories for this, undefined and null --- src/TreeSitter.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TreeSitter.hs b/src/TreeSitter.hs index e5128c724..45e2c1586 100644 --- a/src/TreeSitter.hs +++ b/src/TreeSitter.hs @@ -30,6 +30,9 @@ categoriesForLanguage :: Language -> Text -> Category categoriesForLanguage language name = case (language, name) of (JavaScript, "object") -> DictionaryLiteral (JavaScript, "rel_op") -> BinaryOperator -- relational operator, e.g. >, <, <=, >=, ==, != + (JavaScript, "this_expression") -> Identifier + (JavaScript, "null") -> Identifier + (JavaScript, "undefined") -> Identifier (Ruby, "hash") -> DictionaryLiteral _ -> defaultCategoryForNodeName name