mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
Bind the C language in the where clause.
This commit is contained in:
parent
2ca8e7ca11
commit
5755c314fb
@ -44,12 +44,13 @@ data Language = Language { getTsLanguage :: Ptr TSLanguage, getConstructor :: Co
|
||||
|
||||
languageForType :: String -> Maybe Language
|
||||
languageForType mediaType = case mediaType of
|
||||
".h" -> Just . Language ts_language_c $ constructorForProductions mempty mempty
|
||||
".c" -> Just . Language ts_language_c $ constructorForProductions mempty mempty
|
||||
".h" -> c
|
||||
".c" -> c
|
||||
".js" -> Just . Language ts_language_javascript $ constructorForProductions
|
||||
(Set.fromList [ "object" ])
|
||||
(Set.fromList [ "pair", "rel_op", "math_op", "bool_op", "bitwise_op", "type_op", "math_assignment", "assignment", "subscript_access", "member_access", "new_expression", "function_call", "function", "ternary" ])
|
||||
_ -> Nothing
|
||||
where c = Just . Language ts_language_c $ constructorForProductions mempty mempty
|
||||
|
||||
parseTreeSitterFile :: Language -> Parser
|
||||
parseTreeSitterFile (Language language constructor) contents = do
|
||||
|
Loading…
Reference in New Issue
Block a user