mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +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.Declaration as Declaration
|
||||
import qualified Data.Syntax.Statement as Statement
|
||||
import qualified Data.Abstract.FreeVariables as FV
|
||||
import Data.Term
|
||||
import Data.Text as T (Text, pack)
|
||||
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
|
||||
liftTiers tiers = liftCons2 (liftTiers (liftTiers tiers)) (liftTiers (liftTiers tiers)) Gram
|
||||
|
||||
|
@ -166,14 +166,14 @@ programWithChange :: Term' -> Diff'
|
||||
programWithChange body = merge (programInfo, programInfo) (inj [ function' ])
|
||||
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 ]))))
|
||||
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.
|
||||
programWithChangeOutsideFunction :: Term' -> Diff'
|
||||
programWithChangeOutsideFunction term = merge (programInfo, programInfo) (inj [ function', term' ])
|
||||
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 []))))
|
||||
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
|
||||
|
||||
programWithInsert :: Text -> Term' -> Diff'
|
||||
@ -191,7 +191,7 @@ programOf diff = merge (programInfo, programInfo) (inj [ diff ])
|
||||
functionOf :: Text -> Term' -> Term'
|
||||
functionOf n body = termIn (Just (FunctionDeclaration n mempty Nothing) :. emptyInfo) (inj (Declaration.Function [] name' [] (termIn (Nothing :. emptyInfo) (inj [body]))))
|
||||
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 = Nothing :. emptyInfo
|
||||
@ -218,7 +218,7 @@ blobsForPaths :: Both FilePath -> IO BlobPair
|
||||
blobsForPaths = readFilePair . fmap ("test/fixtures/toc/" <>)
|
||||
|
||||
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
|
||||
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
|
||||
|
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) })
|
||||
{+(Not
|
||||
{+(Equal
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+})+}
|
||||
{+(LessThan
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
(Not
|
||||
(Equal
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(LessThan
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
{+(LessThanEqual
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
{+(GreaterThan
|
||||
{ (LessThanEqual
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})
|
||||
->(GreaterThan
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
{+(Identifier)+}) }
|
||||
{+(GreaterThanEqual
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
@ -76,16 +83,6 @@
|
||||
{+(BAnd
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
{-(Not
|
||||
{-(Equal
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})-})-}
|
||||
{-(LessThan
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})-}
|
||||
{-(LessThanEqual
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})-}
|
||||
{-(GreaterThan
|
||||
{-(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) })
|
||||
{+(Not
|
||||
{+(Equal
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+})+}
|
||||
{+(LessThan
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
(Not
|
||||
(Equal
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(LessThan
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
{+(LessThanEqual
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
@ -76,13 +80,6 @@
|
||||
{+(BAnd
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
{-(Not
|
||||
{-(Equal
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})-})-}
|
||||
{-(LessThan
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})-}
|
||||
{-(LessThanEqual
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})-}
|
||||
|
@ -6,15 +6,18 @@
|
||||
(Identifier)
|
||||
([])
|
||||
(
|
||||
{+(Assignment
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier))
|
||||
{ (Identifier)
|
||||
->([]) })
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
([]))
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
([])))))
|
||||
{-(Assignment
|
||||
{-(Identifier)-}
|
||||
{-([])-})-})))
|
||||
|
@ -6,15 +6,20 @@
|
||||
(Identifier)
|
||||
([])
|
||||
(
|
||||
{+(Assignment
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier))
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
([]))
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
([])))))
|
||||
->([]) })
|
||||
{+(Assignment
|
||||
{+(Identifier)+}
|
||||
{+([])+})+}
|
||||
{-(Assignment
|
||||
{-(Identifier)-}
|
||||
{-([])-})-}
|
||||
{-(Assignment
|
||||
{-(Identifier)-}
|
||||
{-([])-})-})))
|
||||
|
@ -2,18 +2,18 @@
|
||||
(Package
|
||||
(Identifier))
|
||||
(
|
||||
{+(QualifiedImport
|
||||
{+(Identifier)+})+}
|
||||
{+(Import
|
||||
{+(TextElement)+})+}
|
||||
{ (QualifiedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedImport
|
||||
{+(Identifier)+}) }
|
||||
{ (Import
|
||||
{-(TextElement)-})
|
||||
->(Import
|
||||
{+(TextElement)+}) }
|
||||
{ (QualifiedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedImport
|
||||
{+(Identifier)+}) })
|
||||
{-(Import
|
||||
{-(TextElement)-})-}
|
||||
{-(QualifiedImport
|
||||
{-(Identifier)-})-})
|
||||
(Function
|
||||
(Empty)
|
||||
(Identifier)
|
||||
|
@ -2,18 +2,18 @@
|
||||
(Package
|
||||
(Identifier))
|
||||
(
|
||||
{+(QualifiedImport
|
||||
{+(Identifier)+})+}
|
||||
{+(Import
|
||||
{+(TextElement)+})+}
|
||||
{ (QualifiedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedImport
|
||||
{+(Identifier)+}) }
|
||||
{ (Import
|
||||
{-(TextElement)-})
|
||||
->(Import
|
||||
{+(TextElement)+}) }
|
||||
{ (QualifiedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedImport
|
||||
{+(Identifier)+}) })
|
||||
{-(Import
|
||||
{-(TextElement)-})-}
|
||||
{-(QualifiedImport
|
||||
{-(Identifier)-})-})
|
||||
(Function
|
||||
(Empty)
|
||||
(Identifier)
|
||||
|
@ -1,18 +1,18 @@
|
||||
(Program
|
||||
(Package
|
||||
(Identifier))
|
||||
{ (QualifiedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedImport
|
||||
{+(Identifier)+}) }
|
||||
{ (Import
|
||||
{-(TextElement)-})
|
||||
->(Import
|
||||
{+(TextElement)+}) }
|
||||
{ (QualifiedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedImport
|
||||
{+(Identifier)+}) }
|
||||
{+(QualifiedImport
|
||||
{+(Identifier)+})+}
|
||||
{+(Import
|
||||
{+(TextElement)+})+}
|
||||
{+(QualifiedImport
|
||||
{+(Identifier)+})+}
|
||||
{-(QualifiedImport
|
||||
{-(Identifier)-})-}
|
||||
{-(Import
|
||||
{-(TextElement)-})-}
|
||||
{-(QualifiedImport
|
||||
{-(Identifier)-})-}
|
||||
(Function
|
||||
(Empty)
|
||||
(Identifier)
|
||||
|
@ -1,18 +1,18 @@
|
||||
(Program
|
||||
(Package
|
||||
(Identifier))
|
||||
{+(QualifiedImport
|
||||
{+(Identifier)+})+}
|
||||
{+(Import
|
||||
{+(TextElement)+})+}
|
||||
{ (QualifiedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedImport
|
||||
{+(Identifier)+}) }
|
||||
{ (Import
|
||||
{-(TextElement)-})
|
||||
->(Import
|
||||
{+(TextElement)+}) }
|
||||
{ (QualifiedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedImport
|
||||
{+(Identifier)+}) }
|
||||
{-(Import
|
||||
{-(TextElement)-})-}
|
||||
{-(QualifiedImport
|
||||
{-(Identifier)-})-}
|
||||
(Function
|
||||
(Empty)
|
||||
(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)+}
|
||||
{+(Empty)+}
|
||||
{+(Empty)+})+}
|
||||
{+(Slice
|
||||
{+(Identifier)+}
|
||||
{+(Empty)+}
|
||||
{+(Integer)+}
|
||||
{+(Empty)+})+}
|
||||
(Slice
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Integer)
|
||||
->(Empty) }
|
||||
{ (Empty)
|
||||
->(Integer) }
|
||||
(Empty))
|
||||
{+(Slice
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+}
|
||||
@ -24,9 +27,10 @@
|
||||
(Slice
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Integer)
|
||||
{ (Empty)
|
||||
->(Integer) }
|
||||
{ (Integer)
|
||||
->(Integer) }
|
||||
{ (Empty)
|
||||
->(Integer) })
|
||||
{+(Slice
|
||||
@ -34,11 +38,6 @@
|
||||
{+(Integer)+}
|
||||
{+(Integer)+}
|
||||
{+(Empty)+})+}
|
||||
{-(Slice
|
||||
{-(Identifier)-}
|
||||
{-(Empty)-}
|
||||
{-(Integer)-}
|
||||
{-(Empty)-})-}
|
||||
{-(Slice
|
||||
{-(Identifier)-}
|
||||
{-(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) }
|
||||
{+(Negate
|
||||
{+(Identifier)+})+}
|
||||
{+(Not
|
||||
{+(ReceiveOperator
|
||||
{+(Identifier)+})+})+}
|
||||
{+(Pointer
|
||||
{+(Call
|
||||
{+(Identifier)+}
|
||||
{+([])+}
|
||||
{+(Empty)+})+})+}
|
||||
{+(Complement
|
||||
{+(Identifier)+})+}
|
||||
{+(Reference
|
||||
{+(Identifier)+})+}
|
||||
{+(ReceiveOperator
|
||||
{+(Identifier)+})+}
|
||||
{-(Negate
|
||||
{-(Identifier)-})-}
|
||||
{-(Not
|
||||
{-(ReceiveOperator
|
||||
{-(Identifier)-})-})-}
|
||||
{-(Pointer
|
||||
{-(Call
|
||||
{-(Identifier)-}
|
||||
{-([])-}
|
||||
{-(Empty)-})-})-}
|
||||
{-(Complement
|
||||
{-(Identifier)-})-}
|
||||
{-(Reference
|
||||
{-(Identifier)-})-}
|
||||
{-(ReceiveOperator
|
||||
{-(Identifier)-})-})))
|
||||
(Negate
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Not
|
||||
(ReceiveOperator
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Pointer
|
||||
(Call
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
([])
|
||||
(Empty)))
|
||||
(Complement
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Reference
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(ReceiveOperator
|
||||
{ (Identifier)
|
||||
->(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) }
|
||||
{+(Negate
|
||||
{+(Identifier)+})+}
|
||||
{+(Not
|
||||
{+(ReceiveOperator
|
||||
{+(Identifier)+})+})+}
|
||||
{+(Pointer
|
||||
{+(Call
|
||||
{+(Identifier)+}
|
||||
{+([])+}
|
||||
{+(Empty)+})+})+}
|
||||
{+(Complement
|
||||
{+(Identifier)+})+}
|
||||
{+(Reference
|
||||
{+(Identifier)+})+}
|
||||
{+(ReceiveOperator
|
||||
{+(Identifier)+})+}
|
||||
{-(Negate
|
||||
{-(Identifier)-})-}
|
||||
{-(Not
|
||||
{-(ReceiveOperator
|
||||
{-(Identifier)-})-})-}
|
||||
{-(Pointer
|
||||
{-(Call
|
||||
{-(Identifier)-}
|
||||
{-([])-}
|
||||
{-(Empty)-})-})-}
|
||||
{-(Complement
|
||||
{-(Identifier)-})-}
|
||||
{-(Reference
|
||||
{-(Identifier)-})-}
|
||||
{-(ReceiveOperator
|
||||
{-(Identifier)-})-})))
|
||||
(Negate
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Not
|
||||
(ReceiveOperator
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
(Pointer
|
||||
(Call
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
([])
|
||||
(Empty)))
|
||||
(Complement
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(Reference
|
||||
{ (Identifier)
|
||||
->(Identifier) })
|
||||
(ReceiveOperator
|
||||
{ (Identifier)
|
||||
->(Identifier) }))))
|
||||
|
10
test/fixtures/javascript/export.diffA-B.txt
vendored
10
test/fixtures/javascript/export.diffA-B.txt
vendored
@ -35,15 +35,15 @@
|
||||
(Identifier)
|
||||
{ (Empty)
|
||||
->(Identifier) })
|
||||
{+(Assignment
|
||||
{+(Empty)+}
|
||||
{+(Identifier)+}
|
||||
{+(Empty)+})+}
|
||||
(Assignment
|
||||
(Empty)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Empty))))
|
||||
(Empty))
|
||||
{+(Assignment
|
||||
{+(Empty)+}
|
||||
{+(Identifier)+}
|
||||
{+(Empty)+})+}))
|
||||
(DefaultExport
|
||||
{ (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)
|
||||
->(Empty) })
|
||||
{+(Assignment
|
||||
{+(Empty)+}
|
||||
{+(Identifier)+}
|
||||
{+(Empty)+})+}
|
||||
{-(Assignment
|
||||
{-(Empty)-}
|
||||
{-(Identifier)-}
|
||||
{-(Empty)-})-}
|
||||
(Assignment
|
||||
(Empty)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Empty))
|
||||
{-(Assignment
|
||||
{-(Empty)-}
|
||||
{-(Identifier)-}
|
||||
|
14
test/fixtures/javascript/import.diffA-B.txt
vendored
14
test/fixtures/javascript/import.diffA-B.txt
vendored
@ -1,14 +1,11 @@
|
||||
(Program
|
||||
{ (Import)
|
||||
->(Import) }
|
||||
{ (QualifiedAliasedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedAliasedImport
|
||||
{+(Identifier)+}) }
|
||||
{+(Import)+}
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+}
|
||||
{+(Import)+}
|
||||
{+(Import)+}
|
||||
{ (Import)
|
||||
->(Import) }
|
||||
{+(Import)+}
|
||||
{+(
|
||||
{+(Import)+}
|
||||
{+(Import)+})+}
|
||||
@ -17,6 +14,9 @@
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+})+}
|
||||
{+(SideEffectImport)+}
|
||||
{-(QualifiedAliasedImport
|
||||
{-(Identifier)-})-}
|
||||
{-(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
|
||||
{ (Import)
|
||||
->(Import) }
|
||||
{ (QualifiedAliasedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedAliasedImport
|
||||
{+(Identifier)+}) }
|
||||
{+(Import)+}
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+}
|
||||
{+(Import)+}
|
||||
{+(Import)+}
|
||||
{ (Import)
|
||||
@ -17,6 +14,9 @@
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+})+}
|
||||
{+(SideEffectImport)+}
|
||||
{-(QualifiedAliasedImport
|
||||
{-(Identifier)-})-}
|
||||
{-(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) }
|
||||
(Integer))
|
||||
{+(Assignment
|
||||
{+(Identifier)+}
|
||||
{+(
|
||||
{+(Integer)+}
|
||||
{+(Integer)+})+})+}
|
||||
{-(Assignment
|
||||
{-(
|
||||
(Assignment
|
||||
{ (
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})-}
|
||||
{-(
|
||||
{-(Integer)-}
|
||||
{-(Integer)-})-})-}
|
||||
{-(Identifier)-})
|
||||
->(Identifier) }
|
||||
(
|
||||
(Integer)
|
||||
(Integer)))
|
||||
{-(Assignment
|
||||
{-(Identifier)-}
|
||||
{-(
|
||||
|
@ -7,21 +7,21 @@
|
||||
->(RShift
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+}) })
|
||||
{+(Assignment
|
||||
{+(Identifier)+}
|
||||
{+(DividedBy
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+})+})+}
|
||||
(Assignment
|
||||
(Identifier)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (RShift
|
||||
{-(Identifier)-}
|
||||
{-(Integer)-})
|
||||
->(DividedBy
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+}) })
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (DividedBy
|
||||
{-(Identifier)-}
|
||||
{-(Integer)-})
|
||||
->(Plus
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+}) })
|
||||
{-(Assignment
|
||||
{-(Identifier)-}
|
||||
{-(DividedBy
|
||||
{-(Identifier)-}
|
||||
{-(Integer)-})-})-})
|
||||
{+(Integer)+}) }))
|
||||
|
@ -7,23 +7,21 @@
|
||||
->(Plus
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+}) })
|
||||
{+(Assignment
|
||||
{+(Identifier)+}
|
||||
{+(RShift
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+})+})+}
|
||||
{+(Assignment
|
||||
{+(Identifier)+}
|
||||
{+(DividedBy
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+})+})+}
|
||||
{-(Assignment
|
||||
{-(Identifier)-}
|
||||
{-(DividedBy
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (DividedBy
|
||||
{-(Identifier)-}
|
||||
{-(Integer)-})-})-}
|
||||
{-(Assignment
|
||||
{-(Identifier)-}
|
||||
{-(Plus
|
||||
{-(Integer)-})
|
||||
->(RShift
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+}) })
|
||||
(Assignment
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Plus
|
||||
{-(Identifier)-}
|
||||
{-(Integer)-})-})-})
|
||||
{-(Integer)-})
|
||||
->(DividedBy
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+}) }))
|
||||
|
@ -5,22 +5,22 @@
|
||||
{+(LessThanEqual
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
{+(Not
|
||||
{+(Equal
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+})+}
|
||||
{+(GreaterThanEqual
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
{+(GreaterThan
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
(Not
|
||||
(Equal
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{ (Identifier)
|
||||
->(Identifier) }))
|
||||
{+(GreaterThanEqual
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
{+(GreaterThan
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
{+(Not
|
||||
{+(Equal
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+})+}
|
||||
{+(Member
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
|
@ -3,10 +3,10 @@
|
||||
{+(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
|
||||
(Tuple
|
||||
{-(Identifier)-}
|
||||
(Identifier)
|
||||
{+(Tuple
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
(Tuple
|
||||
{-(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
|
||||
(Tuple
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-}
|
||||
(Identifier)
|
||||
{+(Identifier)+})
|
||||
{+(Tuple
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})+}
|
||||
(Tuple
|
||||
{+(Identifier)+}
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
{-(Identifier)-})
|
||||
{-(Tuple
|
||||
{-(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
|
||||
(Hash
|
||||
{+(KeyValue
|
||||
{+(Identifier)+}
|
||||
{+(TextElement)+})+}
|
||||
{+(KeyValue
|
||||
{+(Identifier)+}
|
||||
{+(Integer)+})+}
|
||||
{+(KeyValue
|
||||
{+(Identifier)+}
|
||||
{+(Boolean)+})+}
|
||||
{-(KeyValue
|
||||
{-(Symbol)-}
|
||||
{-(TextElement)-})-}
|
||||
{-(KeyValue
|
||||
{-(Symbol)-}
|
||||
{-(Integer)-})-}
|
||||
{-(KeyValue
|
||||
{-(TextElement)-}
|
||||
{-(Boolean)-})-}
|
||||
(KeyValue
|
||||
{ (Symbol)
|
||||
->(Identifier) }
|
||||
{ (TextElement)
|
||||
->(TextElement) })
|
||||
(KeyValue
|
||||
{ (Symbol)
|
||||
->(Identifier) }
|
||||
{ (Integer)
|
||||
->(Integer) })
|
||||
(KeyValue
|
||||
{ (TextElement)
|
||||
->(Identifier) }
|
||||
{ (Boolean)
|
||||
->(Boolean) })
|
||||
{-(KeyValue
|
||||
{-(Symbol)-}
|
||||
{-(Integer)-})-})
|
||||
|
26
test/fixtures/ruby/hash.diffB-A.txt
vendored
26
test/fixtures/ruby/hash.diffB-A.txt
vendored
@ -1,25 +1,23 @@
|
||||
(Program
|
||||
(Hash
|
||||
{+(KeyValue
|
||||
{+(Symbol)+}
|
||||
{+(TextElement)+})+}
|
||||
{+(KeyValue
|
||||
{+(Symbol)+}
|
||||
{+(Integer)+})+}
|
||||
(KeyValue
|
||||
{ (Identifier)
|
||||
->(Symbol) }
|
||||
{ (TextElement)
|
||||
->(TextElement) })
|
||||
(KeyValue
|
||||
{ (Identifier)
|
||||
->(Symbol) }
|
||||
{ (Integer)
|
||||
->(Integer) })
|
||||
(KeyValue
|
||||
{ (Identifier)
|
||||
->(TextElement) }
|
||||
{ (TextElement)
|
||||
{ (Boolean)
|
||||
->(Boolean) })
|
||||
{+(KeyValue
|
||||
{+(Symbol)+}
|
||||
{+(Integer)+})+}
|
||||
{-(KeyValue
|
||||
{-(Identifier)-}
|
||||
{-(Integer)-})-}
|
||||
{-(KeyValue
|
||||
{-(Identifier)-}
|
||||
{-(Boolean)-})-})
|
||||
{+(Integer)+})+})
|
||||
{+(Hash)+}
|
||||
{+(Hash
|
||||
{+(Context
|
||||
|
10
test/fixtures/typescript/export.diffA-B.txt
vendored
10
test/fixtures/typescript/export.diffA-B.txt
vendored
@ -35,15 +35,15 @@
|
||||
(Identifier)
|
||||
{ (Empty)
|
||||
->(Identifier) })
|
||||
{+(Assignment
|
||||
{+(Empty)+}
|
||||
{+(Identifier)+}
|
||||
{+(Empty)+})+}
|
||||
(Assignment
|
||||
(Empty)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Empty))))
|
||||
(Empty))
|
||||
{+(Assignment
|
||||
{+(Empty)+}
|
||||
{+(Identifier)+}
|
||||
{+(Empty)+})+}))
|
||||
(DefaultExport
|
||||
{ (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)
|
||||
->(Empty) })
|
||||
{+(Assignment
|
||||
{+(Empty)+}
|
||||
{+(Identifier)+}
|
||||
{+(Empty)+})+}
|
||||
{-(Assignment
|
||||
{-(Empty)-}
|
||||
{-(Identifier)-}
|
||||
{-(Empty)-})-}
|
||||
(Assignment
|
||||
(Empty)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Empty))
|
||||
{-(Assignment
|
||||
{-(Empty)-}
|
||||
{-(Identifier)-}
|
||||
|
14
test/fixtures/typescript/import.diffA-B.txt
vendored
14
test/fixtures/typescript/import.diffA-B.txt
vendored
@ -1,14 +1,11 @@
|
||||
(Program
|
||||
{ (Import)
|
||||
->(Import) }
|
||||
{ (QualifiedAliasedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedAliasedImport
|
||||
{+(Identifier)+}) }
|
||||
{+(Import)+}
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+}
|
||||
{+(Import)+}
|
||||
{+(Import)+}
|
||||
{ (Import)
|
||||
->(Import) }
|
||||
{+(Import)+}
|
||||
{+(
|
||||
{+(Import)+}
|
||||
{+(Import)+})+}
|
||||
@ -17,6 +14,9 @@
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+})+}
|
||||
{+(SideEffectImport)+}
|
||||
{-(QualifiedAliasedImport
|
||||
{-(Identifier)-})-}
|
||||
{-(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
|
||||
{ (Import)
|
||||
->(Import) }
|
||||
{ (QualifiedAliasedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedAliasedImport
|
||||
{+(Identifier)+}) }
|
||||
{+(Import)+}
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+}
|
||||
{+(Import)+}
|
||||
{+(Import)+}
|
||||
{ (Import)
|
||||
@ -17,8 +14,11 @@
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+})+}
|
||||
{+(SideEffectImport)+}
|
||||
{+(QualifiedAliasedImport
|
||||
{+(Identifier)+})+}
|
||||
{ (QualifiedAliasedImport
|
||||
{-(Identifier)-})
|
||||
->(QualifiedAliasedImport
|
||||
{+(Identifier)+}) }
|
||||
{-(Import)-}
|
||||
{-(Import)-}
|
||||
{-(Import)-}
|
||||
{-(
|
||||
|
Loading…
Reference in New Issue
Block a user