mirror of
https://github.com/github/semantic.git
synced 2024-12-19 04:41:47 +03:00
commit
1c5e709304
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ profiles
|
||||
tags
|
||||
|
||||
cabal.project.local
|
||||
dist
|
||||
dist-newstyle
|
||||
|
||||
tmp/
|
||||
|
34
Setup.hs
34
Setup.hs
@ -1,34 +1,2 @@
|
||||
import Data.Maybe
|
||||
import qualified Distribution.PackageDescription as P
|
||||
import Distribution.Simple
|
||||
import Distribution.Simple.LocalBuildInfo
|
||||
import Distribution.Simple.Setup
|
||||
import System.Directory
|
||||
import System.Process
|
||||
|
||||
main = defaultMainWithHooks simpleUserHooks { confHook = conf }
|
||||
|
||||
conf :: (P.GenericPackageDescription, P.HookedBuildInfo) -> ConfigFlags -> IO LocalBuildInfo
|
||||
conf x flags = do
|
||||
localBuildInfo <- confHook simpleUserHooks x flags
|
||||
let packageDescription = localPkgDescr localBuildInfo
|
||||
library = fromJust $ P.library packageDescription
|
||||
libraryBuildInfo = P.libBuildInfo library
|
||||
relativeIncludeDirs = [ "common", "i18n" ] in do
|
||||
dir <- getCurrentDirectory
|
||||
let icuLibDir = dir ++ "/vendor/icu/lib"
|
||||
let icuSourceDir = dir ++ "/vendor/icu/source/"
|
||||
icuLibDirExists <- doesDirectoryExist icuLibDir
|
||||
icuSourceDirExists <- doesDirectoryExist icuSourceDir
|
||||
let extraLibDirs = P.extraLibDirs libraryBuildInfo
|
||||
let includeDirs = P.includeDirs libraryBuildInfo
|
||||
return localBuildInfo {
|
||||
localPkgDescr = packageDescription {
|
||||
P.library = Just $ library {
|
||||
P.libBuildInfo = libraryBuildInfo {
|
||||
P.extraLibDirs = if icuLibDirExists then icuLibDir : extraLibDirs else extraLibDirs,
|
||||
P.includeDirs = if icuSourceDirExists then ((icuSourceDir ++) <$> relativeIncludeDirs) ++ includeDirs else includeDirs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
main = defaultMain
|
||||
|
4
cabal.project
Normal file
4
cabal.project
Normal file
@ -0,0 +1,4 @@
|
||||
packages: ./ languages/*/ tools/*/
|
||||
optional-packages: vendor/*/
|
||||
|
||||
jobs: $ncpus
|
@ -40,28 +40,28 @@ generate_example () {
|
||||
diffFileBA="${fileB%%.*}.diffB-A.txt"
|
||||
|
||||
status $parseFileA
|
||||
stack exec semantic parse -- --sexpression $fileA > $parseFileA
|
||||
"$(dirname "$0")/run" semantic parse --sexpression $fileA > $parseFileA
|
||||
|
||||
status $parseFileB
|
||||
stack exec semantic parse -- --sexpression $fileB > $parseFileB
|
||||
"$(dirname "$0")/run" semantic parse --sexpression $fileB > $parseFileB
|
||||
|
||||
status $diffFileAddA
|
||||
stack exec semantic diff -- --sexpression /dev/null $fileA > $diffFileAddA
|
||||
"$(dirname "$0")/run" semantic diff --sexpression /dev/null $fileA > $diffFileAddA
|
||||
|
||||
status $diffFileRemoveA
|
||||
stack exec semantic diff -- --sexpression $fileA /dev/null > $diffFileRemoveA
|
||||
"$(dirname "$0")/run" semantic diff --sexpression $fileA /dev/null > $diffFileRemoveA
|
||||
|
||||
status $diffFileAddB
|
||||
stack exec semantic diff -- --sexpression /dev/null $fileB > $diffFileAddB
|
||||
"$(dirname "$0")/run" semantic diff --sexpression /dev/null $fileB > $diffFileAddB
|
||||
|
||||
status $diffFileRemoveB
|
||||
stack exec semantic diff -- --sexpression $fileB /dev/null > $diffFileRemoveB
|
||||
"$(dirname "$0")/run" semantic diff --sexpression $fileB /dev/null > $diffFileRemoveB
|
||||
|
||||
status $diffFileAB
|
||||
stack exec semantic diff -- --sexpression $fileA $fileB > $diffFileAB
|
||||
"$(dirname "$0")/run" semantic diff --sexpression $fileA $fileB > $diffFileAB
|
||||
|
||||
status $diffFileBA
|
||||
stack exec semantic diff -- --sexpression $fileB $fileA > $diffFileBA
|
||||
"$(dirname "$0")/run" semantic diff --sexpression $fileB $fileA > $diffFileBA
|
||||
}
|
||||
|
||||
if [[ -d $1 ]]; then
|
||||
|
@ -7,7 +7,7 @@ author: Rob Rix, Josh Vera
|
||||
maintainer: rob.rix@github.com
|
||||
copyright: 2016 GitHub
|
||||
category: Web
|
||||
build-type: Custom
|
||||
build-type: Simple
|
||||
-- extra-source-files:
|
||||
cabal-version: >=1.10
|
||||
|
||||
@ -184,12 +184,6 @@ test-suite test
|
||||
default-language: Haskell2010
|
||||
default-extensions: DeriveFunctor, DeriveGeneric, FlexibleContexts, FlexibleInstances, OverloadedStrings, RecordWildCards
|
||||
|
||||
custom-setup
|
||||
setup-depends: base >= 4.8 && < 5
|
||||
, Cabal
|
||||
, directory
|
||||
, process
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: https://github.com/github/semantic-diff
|
||||
|
@ -50,7 +50,7 @@ mapAnnotations :: (Functor f, Functor g)
|
||||
mapAnnotations f = Free.hoistFree (first (fmap f)) . fmap (fmap (fmap f))
|
||||
|
||||
|
||||
instance (NFData (f (Diff f a)), NFData (Term f a), NFData a, Functor f) => NFData (Diff f a) where
|
||||
instance (NFData (f (Diff f a)), NFData (f (Term f a)), NFData a, Functor f) => NFData (Diff f a) where
|
||||
rnf fa = case runFree fa of
|
||||
FreeF.Free f -> rnf f `seq` ()
|
||||
FreeF.Pure a -> rnf a `seq` ()
|
||||
|
@ -4,6 +4,10 @@
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args)
|
||||
{+(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))+}
|
||||
{+(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
@ -13,10 +17,6 @@
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
{+(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))+}
|
||||
{-(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
|
@ -4,6 +4,10 @@
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args)
|
||||
{+(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))+}
|
||||
{+(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
@ -13,10 +17,6 @@
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
{+(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))+}
|
||||
{-(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
|
@ -6,12 +6,13 @@
|
||||
(Args)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{+(Identifier)+}
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Other "expression_list"
|
||||
{ (NumberLiteral)
|
||||
->(NumberLiteral) }
|
||||
{+(NumberLiteral)+})))))
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{+(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))+}
|
||||
{-(Other "expression_list"
|
||||
(NumberLiteral))-}))))
|
||||
|
@ -6,13 +6,13 @@
|
||||
(Args)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+}
|
||||
{+(Other "expression_list"
|
||||
(NumberLiteral))+}
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-}
|
||||
{-(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))-}))))
|
||||
|
@ -9,12 +9,9 @@
|
||||
(NumberLiteral))+}
|
||||
{+(Slice
|
||||
(Identifier))+}
|
||||
{+(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))+}
|
||||
{-(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))-}
|
||||
(Slice
|
||||
{(Identifier)->(Identifier)}
|
||||
{(NumberLiteral)->(NumberLiteral)})
|
||||
{-(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))-}
|
||||
|
23
test/fixtures/go/switch-statements.diffA-B.txt
vendored
23
test/fixtures/go/switch-statements.diffA-B.txt
vendored
@ -15,23 +15,30 @@
|
||||
->(Identifier) })))
|
||||
(FunctionCall
|
||||
(Identifier)))
|
||||
(Case
|
||||
{+(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(RelationalOperator
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(FunctionCall
|
||||
(Identifier)))
|
||||
(Identifier)))+}
|
||||
(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(RelationalOperator
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(NumberLiteral))))
|
||||
{ (Identifier)
|
||||
->(NumberLiteral) })))
|
||||
(FunctionCall
|
||||
{ (Identifier)
|
||||
->(Identifier) })))))
|
||||
->(Identifier) }))
|
||||
{-(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(NumberLiteral))))
|
||||
(FunctionCall
|
||||
(Identifier)))-})))
|
||||
|
34
test/fixtures/go/switch-statements.diffB-A.txt
vendored
34
test/fixtures/go/switch-statements.diffB-A.txt
vendored
@ -15,23 +15,35 @@
|
||||
->(Identifier) })))
|
||||
(FunctionCall
|
||||
(Identifier)))
|
||||
(Case
|
||||
{+(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(RelationalOperator
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(FunctionCall
|
||||
(Identifier)))
|
||||
(Case
|
||||
(Identifier)))+}
|
||||
{+(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(RelationalOperator
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(NumberLiteral))))
|
||||
(FunctionCall
|
||||
{ (Identifier)
|
||||
->(Identifier) })))))
|
||||
(Identifier)))+}
|
||||
{-(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(FunctionCall
|
||||
(Identifier)))-}
|
||||
{-(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(NumberLiteral))))
|
||||
(FunctionCall
|
||||
(Identifier)))-})))
|
||||
|
108
test/fixtures/javascript/import.diffA-B.txt
vendored
108
test/fixtures/javascript/import.diffA-B.txt
vendored
@ -3,83 +3,61 @@
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier))
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "namespace_import"
|
||||
(Identifier)))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))+}
|
||||
{+(Import
|
||||
(StringLiteral))+}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Identifier)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Identifier)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))-}
|
||||
{-(Import
|
||||
(StringLiteral))-})
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }))
|
||||
|
108
test/fixtures/javascript/import.diffB-A.txt
vendored
108
test/fixtures/javascript/import.diffB-A.txt
vendored
@ -3,83 +3,61 @@
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier))
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "namespace_import"
|
||||
(Identifier)))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))+}
|
||||
{+(Import
|
||||
(StringLiteral))+}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Identifier)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Identifier)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))-}
|
||||
{-(Import
|
||||
(StringLiteral))-})
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }))
|
||||
|
4
test/fixtures/ruby/delimiter.diffA-B.txt
vendored
4
test/fixtures/ruby/delimiter.diffA-B.txt
vendored
@ -1,11 +1,11 @@
|
||||
(Program
|
||||
{+(StringLiteral)+}
|
||||
{+(StringLiteral)+}
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
{+(StringLiteral)+}
|
||||
{+(StringLiteral)+}
|
||||
{+(StringLiteral)+}
|
||||
{+(StringLiteral)+}
|
||||
{-(StringLiteral)-}
|
||||
{-(StringLiteral)-}
|
||||
{-(StringLiteral)-}
|
||||
{-(StringLiteral)-}
|
||||
|
4
test/fixtures/ruby/delimiter.diffB-A.txt
vendored
4
test/fixtures/ruby/delimiter.diffB-A.txt
vendored
@ -3,10 +3,10 @@
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
{+(StringLiteral)+}
|
||||
{+(StringLiteral)+}
|
||||
{+(StringLiteral)+}
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
{+(StringLiteral)+}
|
||||
{+(StringLiteral)+}
|
||||
{-(StringLiteral)-}
|
||||
{-(StringLiteral)-}
|
||||
{-(StringLiteral)-}
|
||||
|
22
test/fixtures/ruby/hash.diffA-B.txt
vendored
22
test/fixtures/ruby/hash.diffA-B.txt
vendored
@ -5,18 +5,16 @@
|
||||
->(Identifier) }
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) })
|
||||
{+(Pair
|
||||
(Identifier)
|
||||
(IntegerLiteral))+}
|
||||
{+(Pair
|
||||
(Identifier)
|
||||
(Boolean))+}
|
||||
{-(Pair
|
||||
(SymbolLiteral)
|
||||
(IntegerLiteral))-}
|
||||
{-(Pair
|
||||
(StringLiteral)
|
||||
(Boolean))-}
|
||||
(Pair
|
||||
{ (SymbolLiteral)
|
||||
->(Identifier) }
|
||||
{ (IntegerLiteral)
|
||||
->(IntegerLiteral) })
|
||||
(Pair
|
||||
{ (StringLiteral)
|
||||
->(Identifier) }
|
||||
{ (Boolean)
|
||||
->(Boolean) })
|
||||
{-(Pair
|
||||
(SymbolLiteral)
|
||||
(IntegerLiteral))-}))
|
||||
|
15
test/fixtures/ruby/hash.diffB-A.txt
vendored
15
test/fixtures/ruby/hash.diffB-A.txt
vendored
@ -5,17 +5,16 @@
|
||||
->(SymbolLiteral) }
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) })
|
||||
{+(Pair
|
||||
(SymbolLiteral)
|
||||
(IntegerLiteral))+}
|
||||
(Pair
|
||||
{ (Identifier)
|
||||
->(SymbolLiteral) }
|
||||
{ (IntegerLiteral)
|
||||
->(IntegerLiteral) })
|
||||
(Pair
|
||||
{ (Identifier)
|
||||
->(StringLiteral) }
|
||||
{ (IntegerLiteral)
|
||||
{ (Boolean)
|
||||
->(Boolean) })
|
||||
{+(Pair
|
||||
(SymbolLiteral)
|
||||
(IntegerLiteral))+}
|
||||
{-(Pair
|
||||
(Identifier)
|
||||
(Boolean))-}))
|
||||
(IntegerLiteral))+}))
|
||||
|
6
test/fixtures/ruby/number.diffA-B.txt
vendored
6
test/fixtures/ruby/number.diffA-B.txt
vendored
@ -1,15 +1,15 @@
|
||||
(Program
|
||||
{+(IntegerLiteral)+}
|
||||
{+(IntegerLiteral)+}
|
||||
{ (IntegerLiteral)
|
||||
->(IntegerLiteral) }
|
||||
{+(IntegerLiteral)+}
|
||||
{+(IntegerLiteral)+}
|
||||
{ (IntegerLiteral)
|
||||
->(IntegerLiteral) }
|
||||
{+(IntegerLiteral)+}
|
||||
{+(IntegerLiteral)+}
|
||||
{+(NumberLiteral)+}
|
||||
{-(IntegerLiteral)-}
|
||||
{-(IntegerLiteral)-}
|
||||
{-(IntegerLiteral)-}
|
||||
{-(IntegerLiteral)-}
|
||||
{-(IntegerLiteral)-}
|
||||
{-(NumberLiteral)-})
|
||||
|
10
test/fixtures/ruby/number.diffB-A.txt
vendored
10
test/fixtures/ruby/number.diffB-A.txt
vendored
@ -1,12 +1,12 @@
|
||||
(Program
|
||||
{+(IntegerLiteral)+}
|
||||
{+(IntegerLiteral)+}
|
||||
{+(IntegerLiteral)+}
|
||||
{ (IntegerLiteral)
|
||||
->(IntegerLiteral) }
|
||||
{+(IntegerLiteral)+}
|
||||
{ (IntegerLiteral)
|
||||
->(IntegerLiteral) }
|
||||
{ (IntegerLiteral)
|
||||
->(IntegerLiteral) }
|
||||
{+(IntegerLiteral)+}
|
||||
{+(IntegerLiteral)+}
|
||||
{+(IntegerLiteral)+}
|
||||
{+(NumberLiteral)+}
|
||||
{-(IntegerLiteral)-}
|
||||
{-(IntegerLiteral)-}
|
||||
|
@ -4,19 +4,16 @@
|
||||
{ (Other "==")
|
||||
->(Other "<=>") }
|
||||
(Identifier))
|
||||
{+(Binary
|
||||
(Binary
|
||||
(Identifier)
|
||||
(Other "=~")
|
||||
(Identifier))+}
|
||||
{ (Other "!=")
|
||||
->(Other "=~") }
|
||||
(Identifier))
|
||||
{+(Assignment
|
||||
(Identifier)
|
||||
(Unary
|
||||
(Other "!")
|
||||
(Identifier)))+}
|
||||
{-(Binary
|
||||
(Identifier)
|
||||
(Other "!=")
|
||||
(Identifier))-}
|
||||
{-(Binary
|
||||
(Identifier)
|
||||
(Other "===")
|
||||
|
@ -4,15 +4,12 @@
|
||||
{ (Other "<=>")
|
||||
->(Other "==") }
|
||||
(Identifier))
|
||||
{+(Binary
|
||||
(Identifier)
|
||||
(Other "!=")
|
||||
(Identifier))+}
|
||||
(Binary
|
||||
(Identifier)
|
||||
{ (Other "=~")
|
||||
->(Other "===") }
|
||||
->(Other "!=") }
|
||||
(Identifier))
|
||||
{+(Binary(Identifier)(Other"===")(Identifier))+}
|
||||
{-(Assignment
|
||||
(Identifier)
|
||||
(Unary
|
||||
|
4
test/fixtures/ruby/symbol.diffA-B.txt
vendored
4
test/fixtures/ruby/symbol.diffA-B.txt
vendored
@ -2,6 +2,6 @@
|
||||
{+(SymbolLiteral)+}
|
||||
{ (SymbolLiteral)
|
||||
->(SymbolLiteral) }
|
||||
{ (SymbolLiteral)
|
||||
->(SymbolLiteral) }
|
||||
{+(SymbolLiteral)+}
|
||||
{-(SymbolLiteral)-}
|
||||
{-(SymbolLiteral)-})
|
||||
|
20
test/fixtures/typescript/class.diffB-A.txt
vendored
20
test/fixtures/typescript/class.diffB-A.txt
vendored
@ -22,19 +22,27 @@
|
||||
(Identifier)))
|
||||
(Return
|
||||
(Identifier)))
|
||||
{+(Method
|
||||
(Identifier)
|
||||
(Params
|
||||
(Other "required_parameter"
|
||||
(Identifier)))
|
||||
(Return
|
||||
(Identifier)))+}
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Params
|
||||
(Other "required_parameter"
|
||||
(Identifier)))
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
{-(Method
|
||||
(Identifier)
|
||||
(Params
|
||||
(Other "required_parameter"
|
||||
(Identifier)))
|
||||
(Return
|
||||
(Identifier))))))
|
||||
(Identifier)))-})))
|
||||
|
108
test/fixtures/typescript/import.diffA-B.txt
vendored
108
test/fixtures/typescript/import.diffA-B.txt
vendored
@ -3,83 +3,61 @@
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier))
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "namespace_import"
|
||||
(Identifier)))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))+}
|
||||
{+(Import
|
||||
(StringLiteral))+}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Identifier)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Identifier)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))-}
|
||||
{-(Import
|
||||
(StringLiteral))-})
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }))
|
||||
|
108
test/fixtures/typescript/import.diffB-A.txt
vendored
108
test/fixtures/typescript/import.diffB-A.txt
vendored
@ -3,83 +3,61 @@
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier))
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "namespace_import"
|
||||
(Identifier)))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
{+(Import
|
||||
(StringLiteral)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }
|
||||
(Identifier)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))+}
|
||||
{+(Import
|
||||
(StringLiteral))+}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Identifier)
|
||||
(Other "named_imports"
|
||||
(Other "import_specifier"
|
||||
(Identifier))
|
||||
(Other "import_specifier"
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
{-(Import
|
||||
(StringLiteral)
|
||||
(Identifier)
|
||||
(Other "namespace_import"
|
||||
(Identifier)))-}
|
||||
{-(Import
|
||||
(StringLiteral))-})
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Import
|
||||
{ (StringLiteral)
|
||||
->(StringLiteral) }))
|
||||
|
@ -54,32 +54,25 @@
|
||||
(Ty
|
||||
(Identifier))
|
||||
(NumberLiteral))
|
||||
{+(FieldDecl
|
||||
(Other "accessibility_modifier")
|
||||
(Other "readonly")
|
||||
(Identifier)
|
||||
(FieldDecl
|
||||
{ (Other "readonly")
|
||||
->(Other "accessibility_modifier") }
|
||||
{ (Identifier)
|
||||
->(Other "readonly") }
|
||||
{ (Ty
|
||||
(Identifier))
|
||||
->(Identifier) }
|
||||
{ (NumberLiteral)
|
||||
->(Ty
|
||||
(Identifier)) }
|
||||
{+(StringLiteral)+})
|
||||
(FieldDecl
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Ty
|
||||
(Identifier))
|
||||
(StringLiteral))+}
|
||||
{+(FieldDecl
|
||||
(NumberLiteral))
|
||||
(FieldDecl
|
||||
(Identifier)
|
||||
(Ty
|
||||
(Identifier))
|
||||
(NumberLiteral))+}
|
||||
{+(FieldDecl
|
||||
(Identifier)
|
||||
(NumberLiteral))+}
|
||||
{-(FieldDecl
|
||||
(Other "readonly")
|
||||
(Identifier)
|
||||
(Ty
|
||||
(Identifier))
|
||||
(NumberLiteral))-}
|
||||
{-(FieldDecl
|
||||
(Identifier)
|
||||
(Ty
|
||||
(Identifier))
|
||||
(NumberLiteral))-}
|
||||
{-(FieldDecl
|
||||
(Identifier)
|
||||
(NumberLiteral))-})))
|
||||
{ (NumberLiteral)
|
||||
->(NumberLiteral) }))))
|
||||
|
@ -48,32 +48,25 @@
|
||||
(Ty
|
||||
(Identifier))
|
||||
(NumberLiteral))
|
||||
{+(FieldDecl
|
||||
(Other "readonly")
|
||||
(Identifier)
|
||||
(FieldDecl
|
||||
{ (Other "accessibility_modifier")
|
||||
->(Other "readonly") }
|
||||
{ (Other "readonly")
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Ty
|
||||
(Identifier)) }
|
||||
{ (Ty
|
||||
(Identifier))
|
||||
->(NumberLiteral) }
|
||||
{-(StringLiteral)-})
|
||||
(FieldDecl
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Ty
|
||||
(Identifier))
|
||||
(NumberLiteral))+}
|
||||
{+(FieldDecl
|
||||
(NumberLiteral))
|
||||
(FieldDecl
|
||||
(Identifier)
|
||||
(Ty
|
||||
(Identifier))
|
||||
(NumberLiteral))+}
|
||||
{+(FieldDecl
|
||||
(Identifier)
|
||||
(NumberLiteral))+}
|
||||
{-(FieldDecl
|
||||
(Other "accessibility_modifier")
|
||||
(Other "readonly")
|
||||
(Identifier)
|
||||
(Ty
|
||||
(Identifier))
|
||||
(StringLiteral))-}
|
||||
{-(FieldDecl
|
||||
(Identifier)
|
||||
(Ty
|
||||
(Identifier))
|
||||
(NumberLiteral))-}
|
||||
{-(FieldDecl
|
||||
(Identifier)
|
||||
(NumberLiteral))-})))
|
||||
{ (NumberLiteral)
|
||||
->(NumberLiteral) }))))
|
||||
|
2
vendor/haskell-tree-sitter
vendored
2
vendor/haskell-tree-sitter
vendored
@ -1 +1 @@
|
||||
Subproject commit 2427ad5fe734914a9522d902338cc78b5c42e931
|
||||
Subproject commit db9a5728a1b47b2ff600fe2235ff8d25a999ebeb
|
Loading…
Reference in New Issue
Block a user