1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Merge branch 'master' into ci-profiling

This commit is contained in:
Rick Winfrey 2017-01-31 09:22:38 -08:00 committed by GitHub
commit bccca0ca65
23 changed files with 161 additions and 10 deletions

18
.gitmodules vendored
View File

@ -1,6 +1,3 @@
[submodule "vendor/tree-sitter-parsers"]
path = vendor/tree-sitter-parsers
url = git@github.com:github/tree-sitter-parsers.git
[submodule "vendor/text-icu"]
path = vendor/text-icu
url = https://github.com/joshvera/text-icu
@ -31,3 +28,18 @@
[submodule "vendor/effects"]
path = vendor/effects
url = https://github.com/joshvera/effects.git
[submodule "languages/ruby/vendor/tree-sitter-ruby"]
path = languages/ruby/vendor/tree-sitter-ruby
url = https://github.com/tree-sitter/tree-sitter-ruby.git
[submodule "languages/c/vendor/tree-sitter-c"]
path = languages/c/vendor/tree-sitter-c
url = https://github.com/tree-sitter/tree-sitter-c.git
[submodule "languages/go/vendor/tree-sitter-go"]
path = languages/go/vendor/tree-sitter-go
url = https://github.com/tree-sitter/tree-sitter-go.git
[submodule "languages/javascript/vendor/tree-sitter-javascript"]
path = languages/javascript/vendor/tree-sitter-javascript
url = https://github.com/tree-sitter/tree-sitter-javascript.git
[submodule "vendor/haskell-tree-sitter"]
path = vendor/haskell-tree-sitter
url = https://github.com/tree-sitter/haskell-tree-sitter.git

2
languages/c/Setup.hs Normal file
View File

@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain

24
languages/c/c.cabal Normal file
View File

@ -0,0 +1,24 @@
name: c
version: 0.1.0
synopsis: tree-sitter c language bindings
description: Please see README.md
homepage: https://github.com/github/semantic-diff#readme
author: semantic-code
maintainer: tclem@github.com
copyright: 2017 GitHub
category: Web
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
library
hs-source-dirs: src
exposed-modules: Text.Parser.TreeSitter.C
build-depends: base >= 4.7 && < 5
, haskell-tree-sitter
default-language: Haskell2010
c-sources: vendor/tree-sitter-c/src/parser.c
source-repository head
type: git
location: https://github.com/github/semantic-diff

View File

@ -0,0 +1,6 @@
module Text.Parser.TreeSitter.C where
import Text.Parser.TreeSitter
import Foreign.Ptr
foreign import ccall "vendor/tree-sitter-c/src/parser.c ts_language_c" ts_language_c :: Ptr Language

1
languages/c/vendor/tree-sitter-c vendored Submodule

@ -0,0 +1 @@
Subproject commit e87026a962645ee225c12a75b1556293218e3f76

2
languages/go/Setup.hs Normal file
View File

@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain

24
languages/go/go.cabal Normal file
View File

@ -0,0 +1,24 @@
name: go
version: 0.1.0
synopsis: tree-sitter go language bindings
description: Please see README.md
homepage: https://github.com/github/semantic-diff#readme
author: semantic-code
maintainer: tclem@github.com
copyright: 2017 GitHub
category: Web
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
library
hs-source-dirs: src
exposed-modules: Text.Parser.TreeSitter.Go
build-depends: base >= 4.7 && < 5
, haskell-tree-sitter
default-language: Haskell2010
c-sources: vendor/tree-sitter-go/src/parser.c
source-repository head
type: git
location: https://github.com/github/semantic-diff

View File

@ -0,0 +1,6 @@
module Text.Parser.TreeSitter.Go where
import Text.Parser.TreeSitter
import Foreign.Ptr
foreign import ccall "vendor/tree-sitter-go/src/parser.c ts_language_go" ts_language_go :: Ptr Language

1
languages/go/vendor/tree-sitter-go vendored Submodule

@ -0,0 +1 @@
Subproject commit 0cc565e6aaedc0465b1e397cf8310d6ea8407dce

View File

@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain

View File

@ -0,0 +1,24 @@
name: javascript
version: 0.1.0
synopsis: tree-sitter javascript language bindings
description: Please see README.md
homepage: https://github.com/github/semantic-diff#readme
author: semantic-code
maintainer: tclem@github.com
copyright: 2017 GitHub
category: Web
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
library
hs-source-dirs: src
exposed-modules: Text.Parser.TreeSitter.JavaScript
build-depends: base >= 4.7 && < 5
, haskell-tree-sitter
default-language: Haskell2010
c-sources: vendor/tree-sitter-javascript/src/parser.c
source-repository head
type: git
location: https://github.com/github/semantic-diff

View File

@ -0,0 +1,6 @@
module Text.Parser.TreeSitter.JavaScript where
import Text.Parser.TreeSitter
import Foreign.Ptr
foreign import ccall "vendor/tree-sitter-javascript/src/parser.c ts_language_javascript" ts_language_javascript :: Ptr Language

@ -0,0 +1 @@
Subproject commit 97458010e5ab4b3f178998078c708ef7e9e910d1

2
languages/ruby/Setup.hs Normal file
View File

@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain

24
languages/ruby/ruby.cabal Normal file
View File

@ -0,0 +1,24 @@
name: ruby
version: 0.1.0
synopsis: tree-sitter ruby language bindings
description: Please see README.md
homepage: https://github.com/github/semantic-diff#readme
author: semantic-code
maintainer: tclem@github.com
copyright: 2017 GitHub
category: Web
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
library
hs-source-dirs: src
exposed-modules: Text.Parser.TreeSitter.Ruby
build-depends: base >= 4.7 && < 5
, haskell-tree-sitter
default-language: Haskell2010
c-sources: vendor/tree-sitter-ruby/src/parser.c
source-repository head
type: git
location: https://github.com/github/semantic-diff

View File

@ -0,0 +1,6 @@
module Text.Parser.TreeSitter.Ruby where
import Text.Parser.TreeSitter
import Foreign.Ptr
foreign import ccall "vendor/tree-sitter-ruby/src/parser.c ts_language_ruby" ts_language_ruby :: Ptr Language

@ -0,0 +1 @@
Subproject commit 95e3f84750fb6e8943d97518d5b9fa9cbdb4aa8b

View File

@ -93,9 +93,13 @@ library
, text >= 1.2.1.3
, text-icu
, these
, tree-sitter-parsers
, haskell-tree-sitter
, vector
, wl-pprint-text
, c
, go
, ruby
, javascript
default-language: Haskell2010
default-extensions: DeriveFunctor, DeriveFoldable, DeriveTraversable, DeriveGeneric, FlexibleContexts, FlexibleInstances, OverloadedStrings, NoImplicitPrelude, RecordWildCards, LambdaCase, StrictData
ghc-options: -Wall -fno-warn-name-shadowing -O2 -fprof-auto -j

View File

@ -21,10 +21,13 @@ import Syntax
import System.FilePath
import Term
import TreeSitter
import Text.Parser.TreeSitter.Language
import Renderer
import Renderer.JSON()
import Renderer.SExpression
import Text.Parser.TreeSitter.C
import Text.Parser.TreeSitter.Go
import Text.Parser.TreeSitter.JavaScript
import Text.Parser.TreeSitter.Ruby
data ParseJSON = ParseJSON
{ category :: Text

View File

@ -109,7 +109,7 @@
]
}
},
"summary": "Deleted the ':baz => 1' argument in the foo(:bar => true) method call"
"summary": "Deleted the ':baz => 1' pair in the foo(:bar => true) method call"
}
]
},
@ -150,7 +150,7 @@
]
}
},
"summary": "Added the ':baz => 1' argument in the foo(:bar => true, :baz => 1) method call"
"summary": "Added the ':baz => 1' pair in the foo(:bar => true, :baz => 1) method call"
}
]
},

View File

@ -109,7 +109,7 @@
]
}
},
"summary": "Deleted the 'baz: 1' argument in the foo(bar: true) method call"
"summary": "Deleted the 'baz: 1' pair in the foo(bar: true) method call"
}
]
},
@ -150,7 +150,7 @@
]
}
},
"summary": "Added the 'baz: 1' argument in the foo(bar: true, baz: 1) method call"
"summary": "Added the 'baz: 1' pair in the foo(bar: true, baz: 1) method call"
}
]
},

1
vendor/haskell-tree-sitter vendored Submodule

@ -0,0 +1 @@
Subproject commit 548ef8d114c55c228ef52f02763feae538fdbbf5

@ -1 +0,0 @@
Subproject commit 33d7bdaa7aaf42cb41786e936ba272a36d716b87