From 132208d2c9f21739de06118f5eb1e2b4f02873fc Mon Sep 17 00:00:00 2001 From: joshvera Date: Wed, 15 Mar 2017 17:28:48 -0400 Subject: [PATCH] we just say TypeScript --- .../src/Text/Parser/TreeSitter/Typescript.hs | 2 +- languages/typescript/typescript.cabal | 2 +- semantic-diff.cabal | 2 ++ src/Language/TypeScript.hs | 16 ++++++++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 src/Language/TypeScript.hs diff --git a/languages/typescript/src/Text/Parser/TreeSitter/Typescript.hs b/languages/typescript/src/Text/Parser/TreeSitter/Typescript.hs index 85a1bbe42..f27429ba9 100644 --- a/languages/typescript/src/Text/Parser/TreeSitter/Typescript.hs +++ b/languages/typescript/src/Text/Parser/TreeSitter/Typescript.hs @@ -1,4 +1,4 @@ -module Text.Parser.TreeSitter.Typescript where +module Text.Parser.TreeSitter.TypeScript where import Text.Parser.TreeSitter import Foreign.Ptr diff --git a/languages/typescript/typescript.cabal b/languages/typescript/typescript.cabal index 08f832e5c..cbc61d40c 100644 --- a/languages/typescript/typescript.cabal +++ b/languages/typescript/typescript.cabal @@ -13,7 +13,7 @@ cabal-version: >=1.10 library hs-source-dirs: src - exposed-modules: Text.Parser.TreeSitter.Typescript + exposed-modules: Text.Parser.TreeSitter.TypeScript build-depends: base >= 4.7 && < 5 , haskell-tree-sitter default-language: Haskell2010 diff --git a/semantic-diff.cabal b/semantic-diff.cabal index 0234d2251..bb7a4a7fb 100644 --- a/semantic-diff.cabal +++ b/semantic-diff.cabal @@ -1,4 +1,5 @@ name: semantic-diff + version: 0.2.0 synopsis: Initial project template from stack description: Please see README.md @@ -33,6 +34,7 @@ library , Language , Language.C , Language.JavaScript + , Language.TypeScript , Language.Markdown , Language.Go , Language.Ruby diff --git a/src/Language/TypeScript.hs b/src/Language/TypeScript.hs new file mode 100644 index 000000000..53f132d94 --- /dev/null +++ b/src/Language/TypeScript.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE DataKinds #-} +module Language.JavaScript where + +import Info +import Prologue +import Source +import Language +import qualified Syntax as S +import Term + +termAssignment + :: Source -- ^ The source of the term. + -> Category -- ^ The category for the term. + -> [ SyntaxTerm Text '[Range, Category, SourceSpan] ] -- ^ The child nodes of the term. + -> Maybe (S.Syntax Text (SyntaxTerm Text '[Range, Category, SourceSpan])) -- ^ The resulting term, in Maybe. +termAssignment _ category children