mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
Fix up tests for Name wrapper
This commit is contained in:
parent
7df5567a92
commit
4b9caec4c5
@ -47,6 +47,7 @@ import qualified Data.Syntax as Syntax
|
|||||||
import qualified Data.Syntax.Comment as Comment
|
import qualified Data.Syntax.Comment as Comment
|
||||||
import qualified Data.Syntax.Declaration as Declaration
|
import qualified Data.Syntax.Declaration as Declaration
|
||||||
import qualified Data.Syntax.Statement as Statement
|
import qualified Data.Syntax.Statement as Statement
|
||||||
|
import qualified Data.Abstract.FreeVariables as FV
|
||||||
import Data.Term
|
import Data.Term
|
||||||
import Data.Text as T (Text, pack)
|
import Data.Text as T (Text, pack)
|
||||||
import qualified Data.Text.Encoding as T
|
import qualified Data.Text.Encoding as T
|
||||||
@ -256,6 +257,9 @@ type ListableSyntax = Union
|
|||||||
, []
|
, []
|
||||||
]
|
]
|
||||||
|
|
||||||
|
instance Listable FV.Name where
|
||||||
|
tiers = cons1 FV.name
|
||||||
|
|
||||||
instance Listable1 Gram where
|
instance Listable1 Gram where
|
||||||
liftTiers tiers = liftCons2 (liftTiers (liftTiers tiers)) (liftTiers (liftTiers tiers)) Gram
|
liftTiers tiers = liftCons2 (liftTiers (liftTiers tiers)) (liftTiers (liftTiers tiers)) Gram
|
||||||
|
|
||||||
|
@ -166,14 +166,14 @@ programWithChange :: Term' -> Diff'
|
|||||||
programWithChange body = merge (programInfo, programInfo) (inj [ function' ])
|
programWithChange body = merge (programInfo, programInfo) (inj [ function' ])
|
||||||
where
|
where
|
||||||
function' = merge (Just (FunctionDeclaration "foo" mempty Nothing) :. emptyInfo, Just (FunctionDeclaration "foo" mempty Nothing) :. emptyInfo) (inj (Declaration.Function [] name' [] (merge (Nothing :. emptyInfo, Nothing :. emptyInfo) (inj [ inserting body ]))))
|
function' = merge (Just (FunctionDeclaration "foo" mempty Nothing) :. emptyInfo, Just (FunctionDeclaration "foo" mempty Nothing) :. emptyInfo) (inj (Declaration.Function [] name' [] (merge (Nothing :. emptyInfo, Nothing :. emptyInfo) (inj [ inserting body ]))))
|
||||||
name' = let info = Nothing :. emptyInfo in merge (info, info) (inj (Syntax.Identifier "foo"))
|
name' = let info = Nothing :. emptyInfo in merge (info, info) (inj (Syntax.Identifier (name "foo")))
|
||||||
|
|
||||||
-- Return a diff where term is inserted in the program, below a function found on both sides of the diff.
|
-- Return a diff where term is inserted in the program, below a function found on both sides of the diff.
|
||||||
programWithChangeOutsideFunction :: Term' -> Diff'
|
programWithChangeOutsideFunction :: Term' -> Diff'
|
||||||
programWithChangeOutsideFunction term = merge (programInfo, programInfo) (inj [ function', term' ])
|
programWithChangeOutsideFunction term = merge (programInfo, programInfo) (inj [ function', term' ])
|
||||||
where
|
where
|
||||||
function' = merge (Just (FunctionDeclaration "foo" mempty Nothing) :. emptyInfo, Just (FunctionDeclaration "foo" mempty Nothing) :. emptyInfo) (inj (Declaration.Function [] name' [] (merge (Nothing :. emptyInfo, Nothing :. emptyInfo) (inj []))))
|
function' = merge (Just (FunctionDeclaration "foo" mempty Nothing) :. emptyInfo, Just (FunctionDeclaration "foo" mempty Nothing) :. emptyInfo) (inj (Declaration.Function [] name' [] (merge (Nothing :. emptyInfo, Nothing :. emptyInfo) (inj []))))
|
||||||
name' = let info = Nothing :. emptyInfo in merge (info, info) (inj (Syntax.Identifier "foo"))
|
name' = let info = Nothing :. emptyInfo in merge (info, info) (inj (Syntax.Identifier (name "foo")))
|
||||||
term' = inserting term
|
term' = inserting term
|
||||||
|
|
||||||
programWithInsert :: Text -> Term' -> Diff'
|
programWithInsert :: Text -> Term' -> Diff'
|
||||||
@ -191,7 +191,7 @@ programOf diff = merge (programInfo, programInfo) (inj [ diff ])
|
|||||||
functionOf :: Text -> Term' -> Term'
|
functionOf :: Text -> Term' -> Term'
|
||||||
functionOf n body = termIn (Just (FunctionDeclaration n mempty Nothing) :. emptyInfo) (inj (Declaration.Function [] name' [] (termIn (Nothing :. emptyInfo) (inj [body]))))
|
functionOf n body = termIn (Just (FunctionDeclaration n mempty Nothing) :. emptyInfo) (inj (Declaration.Function [] name' [] (termIn (Nothing :. emptyInfo) (inj [body]))))
|
||||||
where
|
where
|
||||||
name' = termIn (Nothing :. emptyInfo) (inj (Syntax.Identifier (encodeUtf8 n)))
|
name' = termIn (Nothing :. emptyInfo) (inj (Syntax.Identifier (name (encodeUtf8 n))))
|
||||||
|
|
||||||
programInfo :: Record '[Maybe Declaration, Range, Span]
|
programInfo :: Record '[Maybe Declaration, Range, Span]
|
||||||
programInfo = Nothing :. emptyInfo
|
programInfo = Nothing :. emptyInfo
|
||||||
@ -218,7 +218,7 @@ blobsForPaths :: Both FilePath -> IO BlobPair
|
|||||||
blobsForPaths = readFilePair . fmap ("test/fixtures/toc/" <>)
|
blobsForPaths = readFilePair . fmap ("test/fixtures/toc/" <>)
|
||||||
|
|
||||||
blankDiff :: Diff'
|
blankDiff :: Diff'
|
||||||
blankDiff = merge (arrayInfo, arrayInfo) (inj [ inserting (termIn literalInfo (inj (Syntax.Identifier "\"a\""))) ])
|
blankDiff = merge (arrayInfo, arrayInfo) (inj [ inserting (termIn literalInfo (inj (Syntax.Identifier (name "\"a\"")))) ])
|
||||||
where
|
where
|
||||||
arrayInfo = Nothing :. Range 0 3 :. Span (Pos 1 1) (Pos 1 5) :. Nil
|
arrayInfo = Nothing :. Range 0 3 :. Span (Pos 1 1) (Pos 1 5) :. Nil
|
||||||
literalInfo = Nothing :. Range 1 2 :. Span (Pos 1 2) (Pos 1 4) :. Nil
|
literalInfo = Nothing :. Range 1 2 :. Span (Pos 1 2) (Pos 1 4) :. Nil
|
||||||
|
35
test/fixtures/go/binary-expressions.diffA-B.txt
vendored
35
test/fixtures/go/binary-expressions.diffA-B.txt
vendored
@ -27,19 +27,26 @@
|
|||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) })
|
->(Identifier) })
|
||||||
{+(Not
|
(Not
|
||||||
{+(Equal
|
(Equal
|
||||||
{+(Identifier)+}
|
{ (Identifier)
|
||||||
{+(Identifier)+})+})+}
|
->(Identifier) }
|
||||||
{+(LessThan
|
{ (Identifier)
|
||||||
{+(Identifier)+}
|
->(Identifier) }))
|
||||||
{+(Identifier)+})+}
|
(LessThan
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) })
|
||||||
{+(LessThanEqual
|
{+(LessThanEqual
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})+}
|
{+(Identifier)+})+}
|
||||||
{+(GreaterThan
|
{ (LessThanEqual
|
||||||
|
{-(Identifier)-}
|
||||||
|
{-(Identifier)-})
|
||||||
|
->(GreaterThan
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})+}
|
{+(Identifier)+}) }
|
||||||
{+(GreaterThanEqual
|
{+(GreaterThanEqual
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})+}
|
{+(Identifier)+})+}
|
||||||
@ -76,16 +83,6 @@
|
|||||||
{+(BAnd
|
{+(BAnd
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})+}
|
{+(Identifier)+})+}
|
||||||
{-(Not
|
|
||||||
{-(Equal
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Identifier)-})-})-}
|
|
||||||
{-(LessThan
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Identifier)-})-}
|
|
||||||
{-(LessThanEqual
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Identifier)-})-}
|
|
||||||
{-(GreaterThan
|
{-(GreaterThan
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
{-(Identifier)-})-}
|
{-(Identifier)-})-}
|
||||||
|
25
test/fixtures/go/binary-expressions.diffB-A.txt
vendored
25
test/fixtures/go/binary-expressions.diffB-A.txt
vendored
@ -27,13 +27,17 @@
|
|||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) })
|
->(Identifier) })
|
||||||
{+(Not
|
(Not
|
||||||
{+(Equal
|
(Equal
|
||||||
{+(Identifier)+}
|
{ (Identifier)
|
||||||
{+(Identifier)+})+})+}
|
->(Identifier) }
|
||||||
{+(LessThan
|
{ (Identifier)
|
||||||
{+(Identifier)+}
|
->(Identifier) }))
|
||||||
{+(Identifier)+})+}
|
(LessThan
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) })
|
||||||
{+(LessThanEqual
|
{+(LessThanEqual
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})+}
|
{+(Identifier)+})+}
|
||||||
@ -76,13 +80,6 @@
|
|||||||
{+(BAnd
|
{+(BAnd
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})+}
|
{+(Identifier)+})+}
|
||||||
{-(Not
|
|
||||||
{-(Equal
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Identifier)-})-})-}
|
|
||||||
{-(LessThan
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Identifier)-})-}
|
|
||||||
{-(LessThanEqual
|
{-(LessThanEqual
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
{-(Identifier)-})-}
|
{-(Identifier)-})-}
|
||||||
|
@ -6,15 +6,18 @@
|
|||||||
(Identifier)
|
(Identifier)
|
||||||
([])
|
([])
|
||||||
(
|
(
|
||||||
|
{+(Assignment
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Identifier)+})+}
|
||||||
(Assignment
|
(Assignment
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
(Identifier))
|
{ (Identifier)
|
||||||
|
->([]) })
|
||||||
(Assignment
|
(Assignment
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
([]))
|
([]))
|
||||||
(Assignment
|
{-(Assignment
|
||||||
{ (Identifier)
|
{-(Identifier)-}
|
||||||
->(Identifier) }
|
{-([])-})-})))
|
||||||
([])))))
|
|
||||||
|
@ -6,15 +6,20 @@
|
|||||||
(Identifier)
|
(Identifier)
|
||||||
([])
|
([])
|
||||||
(
|
(
|
||||||
|
{+(Assignment
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Identifier)+})+}
|
||||||
(Assignment
|
(Assignment
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
(Identifier))
|
|
||||||
(Assignment
|
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->([]) })
|
||||||
([]))
|
{+(Assignment
|
||||||
(Assignment
|
{+(Identifier)+}
|
||||||
{ (Identifier)
|
{+([])+})+}
|
||||||
->(Identifier) }
|
{-(Assignment
|
||||||
([])))))
|
{-(Identifier)-}
|
||||||
|
{-([])-})-}
|
||||||
|
{-(Assignment
|
||||||
|
{-(Identifier)-}
|
||||||
|
{-([])-})-})))
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
(Package
|
(Package
|
||||||
(Identifier))
|
(Identifier))
|
||||||
(
|
(
|
||||||
|
{+(QualifiedImport
|
||||||
|
{+(Identifier)+})+}
|
||||||
|
{+(Import
|
||||||
|
{+(TextElement)+})+}
|
||||||
{ (QualifiedImport
|
{ (QualifiedImport
|
||||||
{-(Identifier)-})
|
{-(Identifier)-})
|
||||||
->(QualifiedImport
|
->(QualifiedImport
|
||||||
{+(Identifier)+}) }
|
{+(Identifier)+}) }
|
||||||
{ (Import
|
{-(Import
|
||||||
{-(TextElement)-})
|
{-(TextElement)-})-}
|
||||||
->(Import
|
{-(QualifiedImport
|
||||||
{+(TextElement)+}) }
|
{-(Identifier)-})-})
|
||||||
{ (QualifiedImport
|
|
||||||
{-(Identifier)-})
|
|
||||||
->(QualifiedImport
|
|
||||||
{+(Identifier)+}) })
|
|
||||||
(Function
|
(Function
|
||||||
(Empty)
|
(Empty)
|
||||||
(Identifier)
|
(Identifier)
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
(Package
|
(Package
|
||||||
(Identifier))
|
(Identifier))
|
||||||
(
|
(
|
||||||
|
{+(QualifiedImport
|
||||||
|
{+(Identifier)+})+}
|
||||||
|
{+(Import
|
||||||
|
{+(TextElement)+})+}
|
||||||
{ (QualifiedImport
|
{ (QualifiedImport
|
||||||
{-(Identifier)-})
|
{-(Identifier)-})
|
||||||
->(QualifiedImport
|
->(QualifiedImport
|
||||||
{+(Identifier)+}) }
|
{+(Identifier)+}) }
|
||||||
{ (Import
|
{-(Import
|
||||||
{-(TextElement)-})
|
{-(TextElement)-})-}
|
||||||
->(Import
|
{-(QualifiedImport
|
||||||
{+(TextElement)+}) }
|
{-(Identifier)-})-})
|
||||||
{ (QualifiedImport
|
|
||||||
{-(Identifier)-})
|
|
||||||
->(QualifiedImport
|
|
||||||
{+(Identifier)+}) })
|
|
||||||
(Function
|
(Function
|
||||||
(Empty)
|
(Empty)
|
||||||
(Identifier)
|
(Identifier)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
(Program
|
(Program
|
||||||
(Package
|
(Package
|
||||||
(Identifier))
|
(Identifier))
|
||||||
{ (QualifiedImport
|
{+(QualifiedImport
|
||||||
{-(Identifier)-})
|
{+(Identifier)+})+}
|
||||||
->(QualifiedImport
|
{+(Import
|
||||||
{+(Identifier)+}) }
|
{+(TextElement)+})+}
|
||||||
{ (Import
|
{+(QualifiedImport
|
||||||
{-(TextElement)-})
|
{+(Identifier)+})+}
|
||||||
->(Import
|
{-(QualifiedImport
|
||||||
{+(TextElement)+}) }
|
{-(Identifier)-})-}
|
||||||
{ (QualifiedImport
|
{-(Import
|
||||||
{-(Identifier)-})
|
{-(TextElement)-})-}
|
||||||
->(QualifiedImport
|
{-(QualifiedImport
|
||||||
{+(Identifier)+}) }
|
{-(Identifier)-})-}
|
||||||
(Function
|
(Function
|
||||||
(Empty)
|
(Empty)
|
||||||
(Identifier)
|
(Identifier)
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
(Program
|
(Program
|
||||||
(Package
|
(Package
|
||||||
(Identifier))
|
(Identifier))
|
||||||
|
{+(QualifiedImport
|
||||||
|
{+(Identifier)+})+}
|
||||||
|
{+(Import
|
||||||
|
{+(TextElement)+})+}
|
||||||
{ (QualifiedImport
|
{ (QualifiedImport
|
||||||
{-(Identifier)-})
|
{-(Identifier)-})
|
||||||
->(QualifiedImport
|
->(QualifiedImport
|
||||||
{+(Identifier)+}) }
|
{+(Identifier)+}) }
|
||||||
{ (Import
|
{-(Import
|
||||||
{-(TextElement)-})
|
{-(TextElement)-})-}
|
||||||
->(Import
|
{-(QualifiedImport
|
||||||
{+(TextElement)+}) }
|
{-(Identifier)-})-}
|
||||||
{ (QualifiedImport
|
|
||||||
{-(Identifier)-})
|
|
||||||
->(QualifiedImport
|
|
||||||
{+(Identifier)+}) }
|
|
||||||
(Function
|
(Function
|
||||||
(Empty)
|
(Empty)
|
||||||
(Identifier)
|
(Identifier)
|
||||||
|
21
test/fixtures/go/slice-expressions.diffA-B.txt
vendored
21
test/fixtures/go/slice-expressions.diffA-B.txt
vendored
@ -11,11 +11,14 @@
|
|||||||
{+(Integer)+}
|
{+(Integer)+}
|
||||||
{+(Empty)+}
|
{+(Empty)+}
|
||||||
{+(Empty)+})+}
|
{+(Empty)+})+}
|
||||||
{+(Slice
|
(Slice
|
||||||
{+(Identifier)+}
|
{ (Identifier)
|
||||||
{+(Empty)+}
|
->(Identifier) }
|
||||||
{+(Integer)+}
|
{ (Integer)
|
||||||
{+(Empty)+})+}
|
->(Empty) }
|
||||||
|
{ (Empty)
|
||||||
|
->(Integer) }
|
||||||
|
(Empty))
|
||||||
{+(Slice
|
{+(Slice
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Integer)+}
|
{+(Integer)+}
|
||||||
@ -24,9 +27,10 @@
|
|||||||
(Slice
|
(Slice
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
(Integer)
|
|
||||||
{ (Empty)
|
{ (Empty)
|
||||||
->(Integer) }
|
->(Integer) }
|
||||||
|
{ (Integer)
|
||||||
|
->(Integer) }
|
||||||
{ (Empty)
|
{ (Empty)
|
||||||
->(Integer) })
|
->(Integer) })
|
||||||
{+(Slice
|
{+(Slice
|
||||||
@ -34,11 +38,6 @@
|
|||||||
{+(Integer)+}
|
{+(Integer)+}
|
||||||
{+(Integer)+}
|
{+(Integer)+}
|
||||||
{+(Empty)+})+}
|
{+(Empty)+})+}
|
||||||
{-(Slice
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Empty)-}
|
|
||||||
{-(Integer)-}
|
|
||||||
{-(Empty)-})-}
|
|
||||||
{-(Slice
|
{-(Slice
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
{-(Empty)-}
|
{-(Empty)-}
|
||||||
|
54
test/fixtures/go/unary-expressions.diffA-B.txt
vendored
54
test/fixtures/go/unary-expressions.diffA-B.txt
vendored
@ -8,35 +8,25 @@
|
|||||||
(
|
(
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
{+(Negate
|
(Negate
|
||||||
{+(Identifier)+})+}
|
{ (Identifier)
|
||||||
{+(Not
|
->(Identifier) })
|
||||||
{+(ReceiveOperator
|
(Not
|
||||||
{+(Identifier)+})+})+}
|
(ReceiveOperator
|
||||||
{+(Pointer
|
{ (Identifier)
|
||||||
{+(Call
|
->(Identifier) }))
|
||||||
{+(Identifier)+}
|
(Pointer
|
||||||
{+([])+}
|
(Call
|
||||||
{+(Empty)+})+})+}
|
{ (Identifier)
|
||||||
{+(Complement
|
->(Identifier) }
|
||||||
{+(Identifier)+})+}
|
([])
|
||||||
{+(Reference
|
(Empty)))
|
||||||
{+(Identifier)+})+}
|
(Complement
|
||||||
{+(ReceiveOperator
|
{ (Identifier)
|
||||||
{+(Identifier)+})+}
|
->(Identifier) })
|
||||||
{-(Negate
|
(Reference
|
||||||
{-(Identifier)-})-}
|
{ (Identifier)
|
||||||
{-(Not
|
->(Identifier) })
|
||||||
{-(ReceiveOperator
|
(ReceiveOperator
|
||||||
{-(Identifier)-})-})-}
|
{ (Identifier)
|
||||||
{-(Pointer
|
->(Identifier) }))))
|
||||||
{-(Call
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-([])-}
|
|
||||||
{-(Empty)-})-})-}
|
|
||||||
{-(Complement
|
|
||||||
{-(Identifier)-})-}
|
|
||||||
{-(Reference
|
|
||||||
{-(Identifier)-})-}
|
|
||||||
{-(ReceiveOperator
|
|
||||||
{-(Identifier)-})-})))
|
|
||||||
|
54
test/fixtures/go/unary-expressions.diffB-A.txt
vendored
54
test/fixtures/go/unary-expressions.diffB-A.txt
vendored
@ -8,35 +8,25 @@
|
|||||||
(
|
(
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
{+(Negate
|
(Negate
|
||||||
{+(Identifier)+})+}
|
{ (Identifier)
|
||||||
{+(Not
|
->(Identifier) })
|
||||||
{+(ReceiveOperator
|
(Not
|
||||||
{+(Identifier)+})+})+}
|
(ReceiveOperator
|
||||||
{+(Pointer
|
{ (Identifier)
|
||||||
{+(Call
|
->(Identifier) }))
|
||||||
{+(Identifier)+}
|
(Pointer
|
||||||
{+([])+}
|
(Call
|
||||||
{+(Empty)+})+})+}
|
{ (Identifier)
|
||||||
{+(Complement
|
->(Identifier) }
|
||||||
{+(Identifier)+})+}
|
([])
|
||||||
{+(Reference
|
(Empty)))
|
||||||
{+(Identifier)+})+}
|
(Complement
|
||||||
{+(ReceiveOperator
|
{ (Identifier)
|
||||||
{+(Identifier)+})+}
|
->(Identifier) })
|
||||||
{-(Negate
|
(Reference
|
||||||
{-(Identifier)-})-}
|
{ (Identifier)
|
||||||
{-(Not
|
->(Identifier) })
|
||||||
{-(ReceiveOperator
|
(ReceiveOperator
|
||||||
{-(Identifier)-})-})-}
|
{ (Identifier)
|
||||||
{-(Pointer
|
->(Identifier) }))))
|
||||||
{-(Call
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-([])-}
|
|
||||||
{-(Empty)-})-})-}
|
|
||||||
{-(Complement
|
|
||||||
{-(Identifier)-})-}
|
|
||||||
{-(Reference
|
|
||||||
{-(Identifier)-})-}
|
|
||||||
{-(ReceiveOperator
|
|
||||||
{-(Identifier)-})-})))
|
|
||||||
|
10
test/fixtures/javascript/export.diffA-B.txt
vendored
10
test/fixtures/javascript/export.diffA-B.txt
vendored
@ -35,15 +35,15 @@
|
|||||||
(Identifier)
|
(Identifier)
|
||||||
{ (Empty)
|
{ (Empty)
|
||||||
->(Identifier) })
|
->(Identifier) })
|
||||||
{+(Assignment
|
|
||||||
{+(Empty)+}
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(Empty)+})+}
|
|
||||||
(Assignment
|
(Assignment
|
||||||
(Empty)
|
(Empty)
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
(Empty))))
|
(Empty))
|
||||||
|
{+(Assignment
|
||||||
|
{+(Empty)+}
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Empty)+})+}))
|
||||||
(DefaultExport
|
(DefaultExport
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) })
|
->(Identifier) })
|
||||||
|
13
test/fixtures/javascript/export.diffB-A.txt
vendored
13
test/fixtures/javascript/export.diffB-A.txt
vendored
@ -35,14 +35,11 @@
|
|||||||
(Identifier)
|
(Identifier)
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Empty) })
|
->(Empty) })
|
||||||
{+(Assignment
|
(Assignment
|
||||||
{+(Empty)+}
|
(Empty)
|
||||||
{+(Identifier)+}
|
{ (Identifier)
|
||||||
{+(Empty)+})+}
|
->(Identifier) }
|
||||||
{-(Assignment
|
(Empty))
|
||||||
{-(Empty)-}
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Empty)-})-}
|
|
||||||
{-(Assignment
|
{-(Assignment
|
||||||
{-(Empty)-}
|
{-(Empty)-}
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
|
14
test/fixtures/javascript/import.diffA-B.txt
vendored
14
test/fixtures/javascript/import.diffA-B.txt
vendored
@ -1,14 +1,11 @@
|
|||||||
(Program
|
(Program
|
||||||
{ (Import)
|
{+(Import)+}
|
||||||
->(Import) }
|
{+(QualifiedAliasedImport
|
||||||
{ (QualifiedAliasedImport
|
{+(Identifier)+})+}
|
||||||
{-(Identifier)-})
|
{+(Import)+}
|
||||||
->(QualifiedAliasedImport
|
|
||||||
{+(Identifier)+}) }
|
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{ (Import)
|
{ (Import)
|
||||||
->(Import) }
|
->(Import) }
|
||||||
{+(Import)+}
|
|
||||||
{+(
|
{+(
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{+(Import)+})+}
|
{+(Import)+})+}
|
||||||
@ -17,6 +14,9 @@
|
|||||||
{+(QualifiedAliasedImport
|
{+(QualifiedAliasedImport
|
||||||
{+(Identifier)+})+})+}
|
{+(Identifier)+})+})+}
|
||||||
{+(SideEffectImport)+}
|
{+(SideEffectImport)+}
|
||||||
|
{-(QualifiedAliasedImport
|
||||||
|
{-(Identifier)-})-}
|
||||||
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(
|
{-(
|
||||||
|
12
test/fixtures/javascript/import.diffB-A.txt
vendored
12
test/fixtures/javascript/import.diffB-A.txt
vendored
@ -1,10 +1,7 @@
|
|||||||
(Program
|
(Program
|
||||||
{ (Import)
|
{+(Import)+}
|
||||||
->(Import) }
|
{+(QualifiedAliasedImport
|
||||||
{ (QualifiedAliasedImport
|
{+(Identifier)+})+}
|
||||||
{-(Identifier)-})
|
|
||||||
->(QualifiedAliasedImport
|
|
||||||
{+(Identifier)+}) }
|
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{ (Import)
|
{ (Import)
|
||||||
@ -17,6 +14,9 @@
|
|||||||
{+(QualifiedAliasedImport
|
{+(QualifiedAliasedImport
|
||||||
{+(Identifier)+})+})+}
|
{+(Identifier)+})+})+}
|
||||||
{+(SideEffectImport)+}
|
{+(SideEffectImport)+}
|
||||||
|
{-(QualifiedAliasedImport
|
||||||
|
{-(Identifier)-})-}
|
||||||
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(
|
{-(
|
||||||
|
18
test/fixtures/python/assignment.diffA-B.txt
vendored
18
test/fixtures/python/assignment.diffA-B.txt
vendored
@ -10,18 +10,14 @@
|
|||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
(Integer))
|
(Integer))
|
||||||
{+(Assignment
|
(Assignment
|
||||||
{+(Identifier)+}
|
{ (
|
||||||
{+(
|
|
||||||
{+(Integer)+}
|
|
||||||
{+(Integer)+})+})+}
|
|
||||||
{-(Assignment
|
|
||||||
{-(
|
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
{-(Identifier)-})-}
|
{-(Identifier)-})
|
||||||
{-(
|
->(Identifier) }
|
||||||
{-(Integer)-}
|
(
|
||||||
{-(Integer)-})-})-}
|
(Integer)
|
||||||
|
(Integer)))
|
||||||
{-(Assignment
|
{-(Assignment
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
{-(
|
{-(
|
||||||
|
@ -7,21 +7,21 @@
|
|||||||
->(RShift
|
->(RShift
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Integer)+}) })
|
{+(Integer)+}) })
|
||||||
{+(Assignment
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(DividedBy
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(Integer)+})+})+}
|
|
||||||
(Assignment
|
(Assignment
|
||||||
(Identifier)
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
{ (RShift
|
{ (RShift
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
{-(Integer)-})
|
{-(Integer)-})
|
||||||
|
->(DividedBy
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Integer)+}) })
|
||||||
|
(Assignment
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
|
{ (DividedBy
|
||||||
|
{-(Identifier)-}
|
||||||
|
{-(Integer)-})
|
||||||
->(Plus
|
->(Plus
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Integer)+}) })
|
{+(Integer)+}) }))
|
||||||
{-(Assignment
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(DividedBy
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Integer)-})-})-})
|
|
||||||
|
@ -7,23 +7,21 @@
|
|||||||
->(Plus
|
->(Plus
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Integer)+}) })
|
{+(Integer)+}) })
|
||||||
{+(Assignment
|
(Assignment
|
||||||
{+(Identifier)+}
|
{ (Identifier)
|
||||||
{+(RShift
|
->(Identifier) }
|
||||||
{+(Identifier)+}
|
{ (DividedBy
|
||||||
{+(Integer)+})+})+}
|
|
||||||
{+(Assignment
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(DividedBy
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(Integer)+})+})+}
|
|
||||||
{-(Assignment
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(DividedBy
|
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
{-(Integer)-})-})-}
|
{-(Integer)-})
|
||||||
{-(Assignment
|
->(RShift
|
||||||
{-(Identifier)-}
|
{+(Identifier)+}
|
||||||
{-(Plus
|
{+(Integer)+}) })
|
||||||
|
(Assignment
|
||||||
|
{ (Identifier)
|
||||||
|
->(Identifier) }
|
||||||
|
{ (Plus
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
{-(Integer)-})-})-})
|
{-(Integer)-})
|
||||||
|
->(DividedBy
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Integer)+}) }))
|
||||||
|
@ -5,22 +5,22 @@
|
|||||||
{+(LessThanEqual
|
{+(LessThanEqual
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})+}
|
{+(Identifier)+})+}
|
||||||
|
{+(Not
|
||||||
|
{+(Equal
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Identifier)+})+})+}
|
||||||
|
{+(GreaterThanEqual
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Identifier)+})+}
|
||||||
|
{+(GreaterThan
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Identifier)+})+}
|
||||||
(Not
|
(Not
|
||||||
(Equal
|
(Equal
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }))
|
->(Identifier) }))
|
||||||
{+(GreaterThanEqual
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(Identifier)+})+}
|
|
||||||
{+(GreaterThan
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(Identifier)+})+}
|
|
||||||
{+(Not
|
|
||||||
{+(Equal
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(Identifier)+})+})+}
|
|
||||||
{+(Member
|
{+(Member
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})+}
|
{+(Identifier)+})+}
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{ (Import)
|
{ (Import)
|
||||||
->(Import) }
|
->(Import) }
|
||||||
{ (Import)
|
{+(Import)+}
|
||||||
->(Import) }
|
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
|
{-(Import)-}
|
||||||
{-(Import)-})
|
{-(Import)-})
|
||||||
|
15
test/fixtures/python/tuple.diffA-B.txt
vendored
15
test/fixtures/python/tuple.diffA-B.txt
vendored
@ -1,11 +1,14 @@
|
|||||||
(Program
|
(Program
|
||||||
(Tuple
|
{+(Tuple
|
||||||
{-(Identifier)-}
|
|
||||||
(Identifier)
|
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
{+(Identifier)+})
|
{+(Identifier)+}
|
||||||
|
{+(Identifier)+})+}
|
||||||
(Tuple
|
(Tuple
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
(Identifier)
|
(Identifier)
|
||||||
(Identifier))
|
{+(Identifier)+})
|
||||||
{+(Identifier)+})
|
{+(Identifier)+}
|
||||||
|
{-(Tuple
|
||||||
|
{-(Identifier)-}
|
||||||
|
{-(Identifier)-}
|
||||||
|
{-(Identifier)-})-})
|
||||||
|
14
test/fixtures/python/tuple.diffB-A.txt
vendored
14
test/fixtures/python/tuple.diffB-A.txt
vendored
@ -1,11 +1,13 @@
|
|||||||
(Program
|
(Program
|
||||||
(Tuple
|
{+(Tuple
|
||||||
{-(Identifier)-}
|
{+(Identifier)+}
|
||||||
{-(Identifier)-}
|
{+(Identifier)+})+}
|
||||||
(Identifier)
|
|
||||||
{+(Identifier)+})
|
|
||||||
(Tuple
|
(Tuple
|
||||||
{+(Identifier)+}
|
{+(Identifier)+}
|
||||||
(Identifier)
|
(Identifier)
|
||||||
(Identifier))
|
(Identifier)
|
||||||
|
{-(Identifier)-})
|
||||||
|
{-(Tuple
|
||||||
|
{-(Identifier)-}
|
||||||
|
{-(Identifier)-})-}
|
||||||
{-(Identifier)-})
|
{-(Identifier)-})
|
||||||
|
33
test/fixtures/ruby/hash.diffA-B.txt
vendored
33
test/fixtures/ruby/hash.diffA-B.txt
vendored
@ -1,23 +1,20 @@
|
|||||||
(Program
|
(Program
|
||||||
(Hash
|
(Hash
|
||||||
{+(KeyValue
|
(KeyValue
|
||||||
{+(Identifier)+}
|
{ (Symbol)
|
||||||
{+(TextElement)+})+}
|
->(Identifier) }
|
||||||
{+(KeyValue
|
{ (TextElement)
|
||||||
{+(Identifier)+}
|
->(TextElement) })
|
||||||
{+(Integer)+})+}
|
(KeyValue
|
||||||
{+(KeyValue
|
{ (Symbol)
|
||||||
{+(Identifier)+}
|
->(Identifier) }
|
||||||
{+(Boolean)+})+}
|
{ (Integer)
|
||||||
{-(KeyValue
|
->(Integer) })
|
||||||
{-(Symbol)-}
|
(KeyValue
|
||||||
{-(TextElement)-})-}
|
{ (TextElement)
|
||||||
{-(KeyValue
|
->(Identifier) }
|
||||||
{-(Symbol)-}
|
{ (Boolean)
|
||||||
{-(Integer)-})-}
|
->(Boolean) })
|
||||||
{-(KeyValue
|
|
||||||
{-(TextElement)-}
|
|
||||||
{-(Boolean)-})-}
|
|
||||||
{-(KeyValue
|
{-(KeyValue
|
||||||
{-(Symbol)-}
|
{-(Symbol)-}
|
||||||
{-(Integer)-})-})
|
{-(Integer)-})-})
|
||||||
|
26
test/fixtures/ruby/hash.diffB-A.txt
vendored
26
test/fixtures/ruby/hash.diffB-A.txt
vendored
@ -1,25 +1,23 @@
|
|||||||
(Program
|
(Program
|
||||||
(Hash
|
(Hash
|
||||||
{+(KeyValue
|
(KeyValue
|
||||||
{+(Symbol)+}
|
{ (Identifier)
|
||||||
{+(TextElement)+})+}
|
->(Symbol) }
|
||||||
{+(KeyValue
|
{ (TextElement)
|
||||||
{+(Symbol)+}
|
->(TextElement) })
|
||||||
{+(Integer)+})+}
|
(KeyValue
|
||||||
|
{ (Identifier)
|
||||||
|
->(Symbol) }
|
||||||
|
{ (Integer)
|
||||||
|
->(Integer) })
|
||||||
(KeyValue
|
(KeyValue
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(TextElement) }
|
->(TextElement) }
|
||||||
{ (TextElement)
|
{ (Boolean)
|
||||||
->(Boolean) })
|
->(Boolean) })
|
||||||
{+(KeyValue
|
{+(KeyValue
|
||||||
{+(Symbol)+}
|
{+(Symbol)+}
|
||||||
{+(Integer)+})+}
|
{+(Integer)+})+})
|
||||||
{-(KeyValue
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Integer)-})-}
|
|
||||||
{-(KeyValue
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Boolean)-})-})
|
|
||||||
{+(Hash)+}
|
{+(Hash)+}
|
||||||
{+(Hash
|
{+(Hash
|
||||||
{+(Context
|
{+(Context
|
||||||
|
10
test/fixtures/typescript/export.diffA-B.txt
vendored
10
test/fixtures/typescript/export.diffA-B.txt
vendored
@ -35,15 +35,15 @@
|
|||||||
(Identifier)
|
(Identifier)
|
||||||
{ (Empty)
|
{ (Empty)
|
||||||
->(Identifier) })
|
->(Identifier) })
|
||||||
{+(Assignment
|
|
||||||
{+(Empty)+}
|
|
||||||
{+(Identifier)+}
|
|
||||||
{+(Empty)+})+}
|
|
||||||
(Assignment
|
(Assignment
|
||||||
(Empty)
|
(Empty)
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) }
|
->(Identifier) }
|
||||||
(Empty))))
|
(Empty))
|
||||||
|
{+(Assignment
|
||||||
|
{+(Empty)+}
|
||||||
|
{+(Identifier)+}
|
||||||
|
{+(Empty)+})+}))
|
||||||
(DefaultExport
|
(DefaultExport
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Identifier) })
|
->(Identifier) })
|
||||||
|
13
test/fixtures/typescript/export.diffB-A.txt
vendored
13
test/fixtures/typescript/export.diffB-A.txt
vendored
@ -35,14 +35,11 @@
|
|||||||
(Identifier)
|
(Identifier)
|
||||||
{ (Identifier)
|
{ (Identifier)
|
||||||
->(Empty) })
|
->(Empty) })
|
||||||
{+(Assignment
|
(Assignment
|
||||||
{+(Empty)+}
|
(Empty)
|
||||||
{+(Identifier)+}
|
{ (Identifier)
|
||||||
{+(Empty)+})+}
|
->(Identifier) }
|
||||||
{-(Assignment
|
(Empty))
|
||||||
{-(Empty)-}
|
|
||||||
{-(Identifier)-}
|
|
||||||
{-(Empty)-})-}
|
|
||||||
{-(Assignment
|
{-(Assignment
|
||||||
{-(Empty)-}
|
{-(Empty)-}
|
||||||
{-(Identifier)-}
|
{-(Identifier)-}
|
||||||
|
14
test/fixtures/typescript/import.diffA-B.txt
vendored
14
test/fixtures/typescript/import.diffA-B.txt
vendored
@ -1,14 +1,11 @@
|
|||||||
(Program
|
(Program
|
||||||
{ (Import)
|
{+(Import)+}
|
||||||
->(Import) }
|
{+(QualifiedAliasedImport
|
||||||
{ (QualifiedAliasedImport
|
{+(Identifier)+})+}
|
||||||
{-(Identifier)-})
|
{+(Import)+}
|
||||||
->(QualifiedAliasedImport
|
|
||||||
{+(Identifier)+}) }
|
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{ (Import)
|
{ (Import)
|
||||||
->(Import) }
|
->(Import) }
|
||||||
{+(Import)+}
|
|
||||||
{+(
|
{+(
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{+(Import)+})+}
|
{+(Import)+})+}
|
||||||
@ -17,6 +14,9 @@
|
|||||||
{+(QualifiedAliasedImport
|
{+(QualifiedAliasedImport
|
||||||
{+(Identifier)+})+})+}
|
{+(Identifier)+})+})+}
|
||||||
{+(SideEffectImport)+}
|
{+(SideEffectImport)+}
|
||||||
|
{-(QualifiedAliasedImport
|
||||||
|
{-(Identifier)-})-}
|
||||||
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(
|
{-(
|
||||||
|
16
test/fixtures/typescript/import.diffB-A.txt
vendored
16
test/fixtures/typescript/import.diffB-A.txt
vendored
@ -1,10 +1,7 @@
|
|||||||
(Program
|
(Program
|
||||||
{ (Import)
|
{+(Import)+}
|
||||||
->(Import) }
|
{+(QualifiedAliasedImport
|
||||||
{ (QualifiedAliasedImport
|
{+(Identifier)+})+}
|
||||||
{-(Identifier)-})
|
|
||||||
->(QualifiedAliasedImport
|
|
||||||
{+(Identifier)+}) }
|
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{+(Import)+}
|
{+(Import)+}
|
||||||
{ (Import)
|
{ (Import)
|
||||||
@ -17,8 +14,11 @@
|
|||||||
{+(QualifiedAliasedImport
|
{+(QualifiedAliasedImport
|
||||||
{+(Identifier)+})+})+}
|
{+(Identifier)+})+})+}
|
||||||
{+(SideEffectImport)+}
|
{+(SideEffectImport)+}
|
||||||
{+(QualifiedAliasedImport
|
{ (QualifiedAliasedImport
|
||||||
{+(Identifier)+})+}
|
{-(Identifier)-})
|
||||||
|
->(QualifiedAliasedImport
|
||||||
|
{+(Identifier)+}) }
|
||||||
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(Import)-}
|
{-(Import)-}
|
||||||
{-(
|
{-(
|
||||||
|
Loading…
Reference in New Issue
Block a user