1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Add JavaScript language specific categories for this, undefined and null

This commit is contained in:
Rick Winfrey 2016-06-16 09:54:46 -05:00
parent 7292e6ebe4
commit 6e3a2e2a4e

View File

@ -30,6 +30,9 @@ categoriesForLanguage :: Language -> Text -> Category
categoriesForLanguage language name = case (language, name) of categoriesForLanguage language name = case (language, name) of
(JavaScript, "object") -> DictionaryLiteral (JavaScript, "object") -> DictionaryLiteral
(JavaScript, "rel_op") -> BinaryOperator -- relational operator, e.g. >, <, <=, >=, ==, != (JavaScript, "rel_op") -> BinaryOperator -- relational operator, e.g. >, <, <=, >=, ==, !=
(JavaScript, "this_expression") -> Identifier
(JavaScript, "null") -> Identifier
(JavaScript, "undefined") -> Identifier
(Ruby, "hash") -> DictionaryLiteral (Ruby, "hash") -> DictionaryLiteral
_ -> defaultCategoryForNodeName name _ -> defaultCategoryForNodeName name