From 9cd20d8fb1abf0c093c002997cc0c611ebe5f696 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 29 May 2017 13:05:33 -0400 Subject: [PATCH] Handle the other languages. --- src/Semantic.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Semantic.hs b/src/Semantic.hs index 79b91aacc..7ab908410 100644 --- a/src/Semantic.hs +++ b/src/Semantic.hs @@ -22,7 +22,6 @@ import Renderer import Source import Syntax import Term -import Text.Parser.TreeSitter.TypeScript -- This is the primary interface to the Semantic library which provides two -- major classes of functionality: semantic parsing and diffing of source code @@ -104,8 +103,8 @@ parseAndRenderBlob decorator renderer blob@SourceBlob{..} = case blobLanguage of term' <- decorate (const identity) source term render (case renderer of JSON -> JSONRenderer) (Identity blob, term') - Just Language.TypeScript -> do - term <- parse (TreeSitterParser Language.TypeScript tree_sitter_typescript) source + language -> do + term <- parse (parserForLanguage language) source term' <- decorate (const identity) source term render (case renderer of JSON -> JSONRenderer) (Identity blob, term')