mirror of
https://github.com/github/semantic.git
synced 2024-12-25 16:02:43 +03:00
Merge branch 'master' into category-tiers
This commit is contained in:
commit
004197512c
@ -1,10 +1,12 @@
|
||||
#!/bin/bash
|
||||
#/ Usage: script/generate-example fileA fileB
|
||||
#/ script/generate-example directory
|
||||
#/
|
||||
#/ Generate expected output for a test fixture example.
|
||||
#/ Generate expected output for a test fixture example or directory of examples.
|
||||
#/
|
||||
#/ Example:
|
||||
#/ script/generate-example test/fixtures/ruby/and-or.{A,B}.rb
|
||||
#/ script/generate-example test/fixtures/ruby
|
||||
|
||||
set -e
|
||||
[ $# -eq 0 ] && set -- --help
|
||||
@ -18,21 +20,61 @@ fi
|
||||
root=$(cd $(dirname "$0")/.. && pwd)
|
||||
cd "$root"
|
||||
|
||||
fileA="$1"
|
||||
fileB="$2"
|
||||
parseFileA="${fileA%%.*}.parseA.txt"
|
||||
parseFileB="${fileB%%.*}.parseB.txt"
|
||||
diffFileAB="${fileA%%.*}.diffA-B.txt"
|
||||
diffFileBA="${fileB%%.*}.diffB-A.txt"
|
||||
count=0
|
||||
status () {
|
||||
tput cuu 1 && tput el
|
||||
echo "Generating $1"
|
||||
((count+=1))
|
||||
}
|
||||
|
||||
echo "Generating $parseFileA"
|
||||
stack exec semantic-diff -- --sexpression --parse $fileA > $parseFileA
|
||||
generate_example () {
|
||||
fileA="$1"
|
||||
fileB="$2"
|
||||
parseFileA="${fileA%%.*}.parseA.txt"
|
||||
parseFileB="${fileB%%.*}.parseB.txt"
|
||||
diffFileAddA="${fileA%%.*}.diff+A.txt"
|
||||
diffFileRemoveA="${fileA%%.*}.diff-A.txt"
|
||||
diffFileAddB="${fileB%%.*}.diff+B.txt"
|
||||
diffFileRemoveB="${fileB%%.*}.diff-B.txt"
|
||||
diffFileAB="${fileA%%.*}.diffA-B.txt"
|
||||
diffFileBA="${fileB%%.*}.diffB-A.txt"
|
||||
|
||||
echo "Generating $parseFileB"
|
||||
stack exec semantic-diff -- --sexpression --parse $fileB > $parseFileB
|
||||
status $parseFileA
|
||||
stack exec semantic-diff -- --sexpression --parse $fileA > $parseFileA
|
||||
|
||||
echo "Generating $diffFileAB"
|
||||
stack exec semantic-diff -- --sexpression --no-index $fileA $fileB > $diffFileAB
|
||||
status $parseFileB
|
||||
stack exec semantic-diff -- --sexpression --parse $fileB > $parseFileB
|
||||
|
||||
echo "Generating $diffFileBA"
|
||||
stack exec semantic-diff -- --sexpression --no-index $fileB $fileA > $diffFileBA
|
||||
status $diffFileAddA
|
||||
stack exec semantic-diff -- --sexpression --no-index /dev/null $fileA > $diffFileAddA
|
||||
|
||||
status $diffFileRemoveA
|
||||
stack exec semantic-diff -- --sexpression --no-index $fileA /dev/null > $diffFileRemoveA
|
||||
|
||||
status $diffFileAddB
|
||||
stack exec semantic-diff -- --sexpression --no-index /dev/null $fileB > $diffFileAddB
|
||||
|
||||
status $diffFileRemoveB
|
||||
stack exec semantic-diff -- --sexpression --no-index $fileB /dev/null > $diffFileRemoveB
|
||||
|
||||
status $diffFileAB
|
||||
stack exec semantic-diff -- --sexpression --no-index $fileA $fileB > $diffFileAB
|
||||
|
||||
status $diffFileBA
|
||||
stack exec semantic-diff -- --sexpression --no-index $fileB $fileA > $diffFileBA
|
||||
}
|
||||
|
||||
if [[ -d $1 ]]; then
|
||||
echo "Generating all examples for $1"
|
||||
echo ""
|
||||
for f in $(ls $1/*.A.*); do
|
||||
# echo "${f%%.*}.B."${f##*.}""
|
||||
generate_example $f "${f%%.*}.B."${f##*.}""
|
||||
done
|
||||
else
|
||||
echo "Generating examples just for $1 $2"
|
||||
echo ""
|
||||
generate_example $1 $2
|
||||
fi
|
||||
|
||||
echo "Done. Generated $count examples."
|
||||
|
@ -1,5 +1,5 @@
|
||||
{-# OPTIONS_GHC -fno-warn-orphans -funbox-strict-fields #-}
|
||||
module Data.Functor.Both (Both,both, runBothWith, fst, snd, module X) where
|
||||
module Data.Functor.Both (Both, both, runBothWith, fst, snd, module X) where
|
||||
|
||||
import Data.Bifunctor.Join as X
|
||||
import Prologue hiding (fst, snd)
|
||||
|
16
src/Parse.hs
16
src/Parse.hs
@ -19,6 +19,7 @@ import Prologue
|
||||
import Source
|
||||
import Syntax
|
||||
import System.FilePath
|
||||
import System.IO (withBinaryFile, hFileSize)
|
||||
import Term
|
||||
import TreeSitter
|
||||
import Renderer
|
||||
@ -110,9 +111,22 @@ parserForFilepath = parserForType . toS . takeExtension
|
||||
-- | Read the file and convert it to Unicode.
|
||||
readAndTranscodeFile :: FilePath -> IO Source
|
||||
readAndTranscodeFile path = do
|
||||
text <- B1.readFile path
|
||||
size <- fileSize path
|
||||
text <- case size of
|
||||
0 -> pure B1.empty
|
||||
_ -> B1.readFile path
|
||||
transcode text
|
||||
|
||||
-- From https://github.com/haskell/bytestring/pull/79/files
|
||||
fileSize :: FilePath -> IO Integer
|
||||
fileSize f = withBinaryFile f ReadMode $ \h -> do
|
||||
-- hFileSize fails if file is not regular file (like /dev/null). Catch
|
||||
-- exception and try reading anyway.
|
||||
filesz <- catch (hFileSize h) useZeroIfNotRegularFile
|
||||
pure $ fromIntegral filesz `max` 0
|
||||
where useZeroIfNotRegularFile :: IOException -> IO Integer
|
||||
useZeroIfNotRegularFile _ = return 0
|
||||
|
||||
-- | Transcode a file to a unicode source.
|
||||
transcode :: B1.ByteString -> IO Source
|
||||
transcode text = fromText <$> do
|
||||
|
@ -16,6 +16,7 @@ import Git.Types
|
||||
import Git.Libgit2.Backend
|
||||
import Options.Applicative hiding (action)
|
||||
import System.Timeout as Timeout
|
||||
import System.FilePath.Posix (hasExtension)
|
||||
import Data.List ((\\))
|
||||
import qualified Diffing as D
|
||||
import qualified Git
|
||||
@ -88,9 +89,10 @@ diffPaths :: Arguments -> Both FilePath -> IO ()
|
||||
diffPaths args@Arguments{..} paths = do
|
||||
sources <- traverse readAndTranscodeFile paths
|
||||
let sourceBlobs = Source.SourceBlob <$> sources <*> pure mempty <*> paths <*> pure (Just Source.defaultPlainBlob)
|
||||
D.printDiff (parserForFilepath (fst paths)) (diffArgs args) sourceBlobs
|
||||
D.printDiff (parserForFilepath path) (diffArgs args) sourceBlobs
|
||||
where
|
||||
diffArgs Arguments{..} = R.DiffArguments { format = format, output = output }
|
||||
path = fromMaybe (panic "none of the paths have file extensions") $ find hasExtension paths
|
||||
|
||||
fetchDiffs :: Arguments -> IO [R.Output]
|
||||
fetchDiffs args@Arguments{..} = do
|
||||
|
@ -6,7 +6,7 @@ import Data.Functor.Both
|
||||
import Data.Record
|
||||
import qualified Data.Text as T
|
||||
import GHC.Show (Show(..))
|
||||
import Data.List (union)
|
||||
import Data.List (union, concat, transpose)
|
||||
import Diffing
|
||||
import Info
|
||||
import Parse
|
||||
@ -59,19 +59,29 @@ examples directory = do
|
||||
bs <- globFor "*.B.*"
|
||||
sExpAs <- globFor "*.parseA.txt"
|
||||
sExpBs <- globFor "*.parseB.txt"
|
||||
sExpDiffsAddA <- globFor "*.diff+A.txt"
|
||||
sExpDiffsRemoveA <- globFor "*.diff-A.txt"
|
||||
sExpDiffsAddB <- globFor "*.diff+B.txt"
|
||||
sExpDiffsRemoveB <- globFor "*.diff-B.txt"
|
||||
sExpDiffsAB <- globFor "*.diffA-B.txt"
|
||||
sExpDiffsBA <- globFor "*.diffB-A.txt"
|
||||
|
||||
let exampleDiff out name = DiffExample (lookupNormalized name as) (lookupNormalized name bs) out
|
||||
let exampleDiff' out name = DiffExample (lookupNormalized name bs) (lookupNormalized name as) out
|
||||
let exampleDiff lefts rights out name = DiffExample (lookupNormalized name lefts) (lookupNormalized name rights) out
|
||||
let exampleAddDiff files out name = DiffExample "" (lookupNormalized name files) out
|
||||
let exampleRemoveDiff files out name = DiffExample (lookupNormalized name files) "" out
|
||||
let exampleParse files out name = ParseExample (lookupNormalized name files) out
|
||||
|
||||
let keys = (normalizeName <$> as) `union` (normalizeName <$> bs)
|
||||
pure $ getExamples exampleDiff sExpDiffsAB keys
|
||||
<> getExamples exampleDiff' sExpDiffsBA keys
|
||||
<> getExamples (exampleParse as) sExpAs keys
|
||||
<> getExamples (exampleParse bs) sExpBs keys
|
||||
pure $ merge [ getExamples (exampleParse as) sExpAs keys
|
||||
, getExamples (exampleParse bs) sExpBs keys
|
||||
, getExamples (exampleAddDiff as) sExpDiffsAddA keys
|
||||
, getExamples (exampleRemoveDiff as) sExpDiffsRemoveA keys
|
||||
, getExamples (exampleAddDiff bs) sExpDiffsAddB keys
|
||||
, getExamples (exampleRemoveDiff bs) sExpDiffsRemoveB keys
|
||||
, getExamples (exampleDiff as bs) sExpDiffsAB keys
|
||||
, getExamples (exampleDiff bs as) sExpDiffsBA keys ]
|
||||
where
|
||||
merge = concat . transpose
|
||||
-- Only returns examples if they exist
|
||||
getExamples f list = foldr (go f list) []
|
||||
where go f list name acc = case lookupNormalized' name list of
|
||||
@ -104,14 +114,17 @@ testParse path expectedOutput = do
|
||||
|
||||
testDiff :: Renderer (Record '[Range, Category, SourceSpan]) -> Both FilePath -> FilePath -> Expectation
|
||||
testDiff renderer paths diff = do
|
||||
sources <- traverse readAndTranscodeFile paths
|
||||
sources <- traverse readAndTranscodeFile' paths
|
||||
diff' <- diffFiles parser renderer (sourceBlobs sources)
|
||||
let actual = (Verbatim . stripWhitespace. concatOutputs . pure) diff'
|
||||
expected <- (Verbatim . stripWhitespace) <$> readFile diff
|
||||
actual `shouldBe` expected
|
||||
where
|
||||
parser = parserForFilepath (fst paths)
|
||||
parser = parserForFilepath filePath
|
||||
sourceBlobs sources = Source.SourceBlob <$> sources <*> pure mempty <*> paths <*> pure (Just Source.defaultPlainBlob)
|
||||
readAndTranscodeFile' path | Prologue.null path = pure Source.empty
|
||||
| otherwise = readAndTranscodeFile path
|
||||
filePath = if fst paths /= "" then fst paths else snd paths
|
||||
|
||||
stripWhitespace :: Text -> Text
|
||||
stripWhitespace = T.foldl' go T.empty
|
||||
|
13
test/fixtures/go/array-types.diff+A.txt
vendored
Normal file
13
test/fixtures/go/array-types.diff+A.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ArrayTy
|
||||
(RelationalOperator
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Identifier))))))+}
|
13
test/fixtures/go/array-types.diff+B.txt
vendored
Normal file
13
test/fixtures/go/array-types.diff+B.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ArrayTy
|
||||
(RelationalOperator
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Identifier))))))+}
|
13
test/fixtures/go/array-types.diff-A.txt
vendored
Normal file
13
test/fixtures/go/array-types.diff-A.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ArrayTy
|
||||
(RelationalOperator
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Identifier))))))-}
|
13
test/fixtures/go/array-types.diff-B.txt
vendored
Normal file
13
test/fixtures/go/array-types.diff-B.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ArrayTy
|
||||
(RelationalOperator
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Identifier))))))-}
|
19
test/fixtures/go/array-with-implicit-length.diff+A.txt
vendored
Normal file
19
test/fixtures/go/array-with-implicit-length.diff+A.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "composite_literal"
|
||||
(ArrayTy
|
||||
(Identifier))
|
||||
(Element
|
||||
(NumberLiteral))
|
||||
(Element
|
||||
(NumberLiteral))
|
||||
(Element
|
||||
(NumberLiteral))))))))+}
|
19
test/fixtures/go/array-with-implicit-length.diff+B.txt
vendored
Normal file
19
test/fixtures/go/array-with-implicit-length.diff+B.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "composite_literal"
|
||||
(ArrayTy
|
||||
(Identifier))
|
||||
(Element
|
||||
(NumberLiteral))
|
||||
(Element
|
||||
(NumberLiteral))
|
||||
(Element
|
||||
(NumberLiteral))))))))+}
|
19
test/fixtures/go/array-with-implicit-length.diff-A.txt
vendored
Normal file
19
test/fixtures/go/array-with-implicit-length.diff-A.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "composite_literal"
|
||||
(ArrayTy
|
||||
(Identifier))
|
||||
(Element
|
||||
(NumberLiteral))
|
||||
(Element
|
||||
(NumberLiteral))
|
||||
(Element
|
||||
(NumberLiteral))))))))-}
|
19
test/fixtures/go/array-with-implicit-length.diff-B.txt
vendored
Normal file
19
test/fixtures/go/array-with-implicit-length.diff-B.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "composite_literal"
|
||||
(ArrayTy
|
||||
(Identifier))
|
||||
(Element
|
||||
(NumberLiteral))
|
||||
(Element
|
||||
(NumberLiteral))
|
||||
(Element
|
||||
(NumberLiteral))))))))-}
|
27
test/fixtures/go/assignment-statements.diff+A.txt
vendored
Normal file
27
test/fixtures/go/assignment-statements.diff+A.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))))+}
|
27
test/fixtures/go/assignment-statements.diff+B.txt
vendored
Normal file
27
test/fixtures/go/assignment-statements.diff+B.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))))+}
|
27
test/fixtures/go/assignment-statements.diff-A.txt
vendored
Normal file
27
test/fixtures/go/assignment-statements.diff-A.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))))-}
|
27
test/fixtures/go/assignment-statements.diff-B.txt
vendored
Normal file
27
test/fixtures/go/assignment-statements.diff-B.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))))-}
|
17
test/fixtures/go/call-expressions.diff+A.txt
vendored
Normal file
17
test/fixtures/go/call-expressions.diff+A.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
17
test/fixtures/go/call-expressions.diff+B.txt
vendored
Normal file
17
test/fixtures/go/call-expressions.diff+B.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
17
test/fixtures/go/call-expressions.diff-A.txt
vendored
Normal file
17
test/fixtures/go/call-expressions.diff-A.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
17
test/fixtures/go/call-expressions.diff-B.txt
vendored
Normal file
17
test/fixtures/go/call-expressions.diff-B.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
6
test/fixtures/go/case-statements.diff+A.txt
vendored
Normal file
6
test/fixtures/go/case-statements.diff+A.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Switch)))+}
|
12
test/fixtures/go/case-statements.diff+B.txt
vendored
Normal file
12
test/fixtures/go/case-statements.diff+B.txt
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Switch
|
||||
(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier))))))+}
|
6
test/fixtures/go/case-statements.diff-A.txt
vendored
Normal file
6
test/fixtures/go/case-statements.diff-A.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Switch)))-}
|
12
test/fixtures/go/case-statements.diff-B.txt
vendored
Normal file
12
test/fixtures/go/case-statements.diff-B.txt
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Switch
|
||||
(Case
|
||||
(Case
|
||||
(Other "expression_list"
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier))))))-}
|
21
test/fixtures/go/channel-types.diff+A.txt
vendored
Normal file
21
test/fixtures/go/channel-types.diff+A.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(Identifier))))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(StructTy))))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(Identifier)))))))+}
|
21
test/fixtures/go/channel-types.diff+B.txt
vendored
Normal file
21
test/fixtures/go/channel-types.diff+B.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(Identifier))))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(StructTy))))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(Identifier)))))))+}
|
21
test/fixtures/go/channel-types.diff-A.txt
vendored
Normal file
21
test/fixtures/go/channel-types.diff-A.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(Identifier))))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(StructTy))))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(Identifier)))))))-}
|
21
test/fixtures/go/channel-types.diff-B.txt
vendored
Normal file
21
test/fixtures/go/channel-types.diff-B.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(Identifier))))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(StructTy))))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(ChannelTy
|
||||
(Identifier)))))))-}
|
6
test/fixtures/go/comment.diff+A.txt
vendored
Normal file
6
test/fixtures/go/comment.diff+A.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Comment)))+}
|
6
test/fixtures/go/comment.diff+B.txt
vendored
Normal file
6
test/fixtures/go/comment.diff+B.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Comment)))+}
|
6
test/fixtures/go/comment.diff-A.txt
vendored
Normal file
6
test/fixtures/go/comment.diff-A.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Comment)))-}
|
6
test/fixtures/go/comment.diff-B.txt
vendored
Normal file
6
test/fixtures/go/comment.diff-B.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Comment)))-}
|
12
test/fixtures/go/const-declarations-with-types.diff+A.txt
vendored
Normal file
12
test/fixtures/go/const-declarations-with-types.diff+A.txt
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(Other "expression_list"
|
||||
(NumberLiteral))))))+}
|
14
test/fixtures/go/const-declarations-with-types.diff+B.txt
vendored
Normal file
14
test/fixtures/go/const-declarations-with-types.diff+B.txt
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))))))+}
|
12
test/fixtures/go/const-declarations-with-types.diff-A.txt
vendored
Normal file
12
test/fixtures/go/const-declarations-with-types.diff-A.txt
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(Other "expression_list"
|
||||
(NumberLiteral))))))-}
|
14
test/fixtures/go/const-declarations-with-types.diff-B.txt
vendored
Normal file
14
test/fixtures/go/const-declarations-with-types.diff-B.txt
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))))))-}
|
11
test/fixtures/go/const-declarations-without-types.diff+A.txt
vendored
Normal file
11
test/fixtures/go/const-declarations-without-types.diff+A.txt
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral))))))+}
|
13
test/fixtures/go/const-declarations-without-types.diff+B.txt
vendored
Normal file
13
test/fixtures/go/const-declarations-without-types.diff+B.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))))))+}
|
11
test/fixtures/go/const-declarations-without-types.diff-A.txt
vendored
Normal file
11
test/fixtures/go/const-declarations-without-types.diff-A.txt
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral))))))-}
|
13
test/fixtures/go/const-declarations-without-types.diff-B.txt
vendored
Normal file
13
test/fixtures/go/const-declarations-without-types.diff-B.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))))))-}
|
17
test/fixtures/go/const-with-implicit-values.diff+A.txt
vendored
Normal file
17
test/fixtures/go/const-with-implicit-values.diff+A.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Identifier)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))))))+}
|
17
test/fixtures/go/const-with-implicit-values.diff+B.txt
vendored
Normal file
17
test/fixtures/go/const-with-implicit-values.diff+B.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Identifier)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))))))+}
|
17
test/fixtures/go/const-with-implicit-values.diff-A.txt
vendored
Normal file
17
test/fixtures/go/const-with-implicit-values.diff-A.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Identifier)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))))))-}
|
17
test/fixtures/go/const-with-implicit-values.diff-B.txt
vendored
Normal file
17
test/fixtures/go/const-with-implicit-values.diff-B.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Identifier)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))))))-}
|
27
test/fixtures/go/constructors.diff+A.txt
vendored
Normal file
27
test/fixtures/go/constructors.diff+A.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier))
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier))
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(DictionaryTy
|
||||
(Identifier)
|
||||
(Identifier)))))+}
|
27
test/fixtures/go/constructors.diff+B.txt
vendored
Normal file
27
test/fixtures/go/constructors.diff+B.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier))
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier))
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(DictionaryTy
|
||||
(Identifier)
|
||||
(Identifier)))))+}
|
27
test/fixtures/go/constructors.diff-A.txt
vendored
Normal file
27
test/fixtures/go/constructors.diff-A.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier))
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier))
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(DictionaryTy
|
||||
(Identifier)
|
||||
(Identifier)))))-}
|
27
test/fixtures/go/constructors.diff-B.txt
vendored
Normal file
27
test/fixtures/go/constructors.diff-B.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier))
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(ChannelTy
|
||||
(Identifier))
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(DictionaryTy
|
||||
(Identifier)
|
||||
(Identifier)))))-}
|
30
test/fixtures/go/float-literals.diff+A.txt
vendored
Normal file
30
test/fixtures/go/float-literals.diff+A.txt
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))))+}
|
30
test/fixtures/go/float-literals.diff+B.txt
vendored
Normal file
30
test/fixtures/go/float-literals.diff+B.txt
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))))+}
|
30
test/fixtures/go/float-literals.diff-A.txt
vendored
Normal file
30
test/fixtures/go/float-literals.diff-A.txt
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))))-}
|
30
test/fixtures/go/float-literals.diff-B.txt
vendored
Normal file
30
test/fixtures/go/float-literals.diff-B.txt
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FloatLiteral)))))-}
|
46
test/fixtures/go/for-statements.diff+A.txt
vendored
Normal file
46
test/fixtures/go/for-statements.diff+A.txt
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(For
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Other "goto_statement"
|
||||
(Identifier))))
|
||||
(For
|
||||
(VarDecl
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(IncrementStatement)
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Break
|
||||
(Identifier)))
|
||||
(For
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(IncrementStatement)
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Continue
|
||||
(Identifier)))
|
||||
(For
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Continue))
|
||||
(For
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Break))))+}
|
37
test/fixtures/go/for-statements.diff+B.txt
vendored
Normal file
37
test/fixtures/go/for-statements.diff+B.txt
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(For
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Other "goto_statement"
|
||||
(Identifier)))
|
||||
(For
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Break
|
||||
(Identifier)))
|
||||
(For
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Continue
|
||||
(Identifier)))
|
||||
(For
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(IncrementStatement)
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Continue))
|
||||
(For
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Break)))))+}
|
46
test/fixtures/go/for-statements.diff-A.txt
vendored
Normal file
46
test/fixtures/go/for-statements.diff-A.txt
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(For
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Other "goto_statement"
|
||||
(Identifier))))
|
||||
(For
|
||||
(VarDecl
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(IncrementStatement)
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Break
|
||||
(Identifier)))
|
||||
(For
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(IncrementStatement)
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Continue
|
||||
(Identifier)))
|
||||
(For
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Continue))
|
||||
(For
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Break))))-}
|
37
test/fixtures/go/for-statements.diff-B.txt
vendored
Normal file
37
test/fixtures/go/for-statements.diff-B.txt
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(For
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Other "goto_statement"
|
||||
(Identifier)))
|
||||
(For
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Break
|
||||
(Identifier)))
|
||||
(For
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Continue
|
||||
(Identifier)))
|
||||
(For
|
||||
(RelationalOperator
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(IncrementStatement)
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(Continue))
|
||||
(For
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Break)))))-}
|
34
test/fixtures/go/function-declarations.diff+A.txt
vendored
Normal file
34
test/fixtures/go/function-declarations.diff+A.txt
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
{+(ParseError
|
||||
(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(ParseError
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(Function
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))))+}
|
34
test/fixtures/go/function-declarations.diff+B.txt
vendored
Normal file
34
test/fixtures/go/function-declarations.diff+B.txt
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
{+(ParseError
|
||||
(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(ParseError
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(Function
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))))+}
|
34
test/fixtures/go/function-declarations.diff-A.txt
vendored
Normal file
34
test/fixtures/go/function-declarations.diff-A.txt
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
{-(ParseError
|
||||
(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(ParseError
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(Function
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))))-}
|
34
test/fixtures/go/function-declarations.diff-B.txt
vendored
Normal file
34
test/fixtures/go/function-declarations.diff-B.txt
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
{-(ParseError
|
||||
(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(ParseError
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(Function
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))))-}
|
17
test/fixtures/go/function-literals.diff+A.txt
vendored
Normal file
17
test/fixtures/go/function-literals.diff+A.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(AnonymousFunction
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Return
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)))))))))+}
|
17
test/fixtures/go/function-literals.diff+B.txt
vendored
Normal file
17
test/fixtures/go/function-literals.diff+B.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(AnonymousFunction
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Return
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)))))))))+}
|
17
test/fixtures/go/function-literals.diff-A.txt
vendored
Normal file
17
test/fixtures/go/function-literals.diff-A.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(AnonymousFunction
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Return
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)))))))))-}
|
17
test/fixtures/go/function-literals.diff-B.txt
vendored
Normal file
17
test/fixtures/go/function-literals.diff-B.txt
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(AnonymousFunction
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Return
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)))))))))-}
|
21
test/fixtures/go/function-types.diff+A.txt
vendored
Normal file
21
test/fixtures/go/function-types.diff+A.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(FunctionTy
|
||||
(Args
|
||||
(Identifier))
|
||||
(Identifier)))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(FunctionTy
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier)))))))+}
|
23
test/fixtures/go/function-types.diff+B.txt
vendored
Normal file
23
test/fixtures/go/function-types.diff+B.txt
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(FunctionTy
|
||||
(Args
|
||||
(Identifier))
|
||||
(Identifier)))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(FunctionTy
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(ChannelTy
|
||||
(ParseError)
|
||||
(Identifier)))))))))+}
|
21
test/fixtures/go/function-types.diff-A.txt
vendored
Normal file
21
test/fixtures/go/function-types.diff-A.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(FunctionTy
|
||||
(Args
|
||||
(Identifier))
|
||||
(Identifier)))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(FunctionTy
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier)))))))-}
|
23
test/fixtures/go/function-types.diff-B.txt
vendored
Normal file
23
test/fixtures/go/function-types.diff-B.txt
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "type_declaration"
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(FunctionTy
|
||||
(Args
|
||||
(Identifier))
|
||||
(Identifier)))
|
||||
(TypeDecl
|
||||
(Identifier)
|
||||
(FunctionTy
|
||||
(Args
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(ChannelTy
|
||||
(ParseError)
|
||||
(Identifier)))))))))-}
|
15
test/fixtures/go/go-and-defer-statements.diff+A.txt
vendored
Normal file
15
test/fixtures/go/go-and-defer-statements.diff+A.txt
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Defer
|
||||
(FunctionCall
|
||||
(SubscriptAccess
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(Go
|
||||
(FunctionCall
|
||||
(SubscriptAccess
|
||||
(Identifier)
|
||||
(Identifier))))))+}
|
15
test/fixtures/go/go-and-defer-statements.diff+B.txt
vendored
Normal file
15
test/fixtures/go/go-and-defer-statements.diff+B.txt
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Defer
|
||||
(FunctionCall
|
||||
(SubscriptAccess
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(Go
|
||||
(FunctionCall
|
||||
(SubscriptAccess
|
||||
(Identifier)
|
||||
(Identifier))))))+}
|
15
test/fixtures/go/go-and-defer-statements.diff-A.txt
vendored
Normal file
15
test/fixtures/go/go-and-defer-statements.diff-A.txt
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Defer
|
||||
(FunctionCall
|
||||
(SubscriptAccess
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(Go
|
||||
(FunctionCall
|
||||
(SubscriptAccess
|
||||
(Identifier)
|
||||
(Identifier))))))-}
|
15
test/fixtures/go/go-and-defer-statements.diff-B.txt
vendored
Normal file
15
test/fixtures/go/go-and-defer-statements.diff-B.txt
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Defer
|
||||
(FunctionCall
|
||||
(SubscriptAccess
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(Go
|
||||
(FunctionCall
|
||||
(SubscriptAccess
|
||||
(Identifier)
|
||||
(Identifier))))))-}
|
13
test/fixtures/go/grouped-import-declarations.diff+A.txt
vendored
Normal file
13
test/fixtures/go/grouped-import-declarations.diff+A.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(TypeConversion
|
||||
(Identifier)
|
||||
(StringLiteral)
|
||||
(ParseError
|
||||
(StringLiteral)
|
||||
(Import
|
||||
(Identifier)
|
||||
(StringLiteral))))))+}
|
13
test/fixtures/go/grouped-import-declarations.diff+B.txt
vendored
Normal file
13
test/fixtures/go/grouped-import-declarations.diff+B.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(TypeConversion
|
||||
(Identifier)
|
||||
(StringLiteral)
|
||||
(ParseError
|
||||
(StringLiteral)
|
||||
(Import
|
||||
(Identifier)
|
||||
(StringLiteral))))))+}
|
13
test/fixtures/go/grouped-import-declarations.diff-A.txt
vendored
Normal file
13
test/fixtures/go/grouped-import-declarations.diff-A.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(TypeConversion
|
||||
(Identifier)
|
||||
(StringLiteral)
|
||||
(ParseError
|
||||
(StringLiteral)
|
||||
(Import
|
||||
(Identifier)
|
||||
(StringLiteral))))))-}
|
13
test/fixtures/go/grouped-import-declarations.diff-B.txt
vendored
Normal file
13
test/fixtures/go/grouped-import-declarations.diff-B.txt
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(TypeConversion
|
||||
(Identifier)
|
||||
(StringLiteral)
|
||||
(ParseError
|
||||
(StringLiteral)
|
||||
(Import
|
||||
(Identifier)
|
||||
(StringLiteral))))))-}
|
16
test/fixtures/go/grouped-var-declarations.diff+A.txt
vendored
Normal file
16
test/fixtures/go/grouped-var-declarations.diff+A.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "var_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral))))))+}
|
16
test/fixtures/go/grouped-var-declarations.diff+B.txt
vendored
Normal file
16
test/fixtures/go/grouped-var-declarations.diff+B.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "var_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral))))))+}
|
16
test/fixtures/go/grouped-var-declarations.diff-A.txt
vendored
Normal file
16
test/fixtures/go/grouped-var-declarations.diff-A.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "var_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral))))))-}
|
16
test/fixtures/go/grouped-var-declarations.diff-B.txt
vendored
Normal file
16
test/fixtures/go/grouped-var-declarations.diff-B.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "var_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral))))))-}
|
31
test/fixtures/go/if-statements.diff+A.txt
vendored
Normal file
31
test/fixtures/go/if-statements.diff+A.txt
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(If
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(If
|
||||
(VarDecl
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(If
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier)))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))))+}
|
31
test/fixtures/go/if-statements.diff+B.txt
vendored
Normal file
31
test/fixtures/go/if-statements.diff+B.txt
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(If
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(If
|
||||
(VarDecl
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(If
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier)))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))))+}
|
31
test/fixtures/go/if-statements.diff-A.txt
vendored
Normal file
31
test/fixtures/go/if-statements.diff-A.txt
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(If
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(If
|
||||
(VarDecl
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(If
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier)))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))))-}
|
31
test/fixtures/go/if-statements.diff-B.txt
vendored
Normal file
31
test/fixtures/go/if-statements.diff-B.txt
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(If
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(If
|
||||
(VarDecl
|
||||
(Other "expression_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(Identifier)
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))
|
||||
(If
|
||||
(FunctionCall
|
||||
(Identifier))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier)))
|
||||
(ExpressionStatements
|
||||
(FunctionCall
|
||||
(Identifier))))))-}
|
16
test/fixtures/go/imaginary-literals.diff+A.txt
vendored
Normal file
16
test/fixtures/go/imaginary-literals.diff+A.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "imaginary_literal")))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "imaginary_literal"))))))+}
|
16
test/fixtures/go/imaginary-literals.diff+B.txt
vendored
Normal file
16
test/fixtures/go/imaginary-literals.diff+B.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "imaginary_literal")))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "imaginary_literal"))))))+}
|
16
test/fixtures/go/imaginary-literals.diff-A.txt
vendored
Normal file
16
test/fixtures/go/imaginary-literals.diff-A.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "imaginary_literal")))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "imaginary_literal"))))))-}
|
16
test/fixtures/go/imaginary-literals.diff-B.txt
vendored
Normal file
16
test/fixtures/go/imaginary-literals.diff-B.txt
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "imaginary_literal")))
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(Other "imaginary_literal"))))))-}
|
7
test/fixtures/go/increment-decrement-statements.diff+A.txt
vendored
Normal file
7
test/fixtures/go/increment-decrement-statements.diff+A.txt
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(IncrementStatement)
|
||||
(DecrementStatement)))+}
|
7
test/fixtures/go/increment-decrement-statements.diff+B.txt
vendored
Normal file
7
test/fixtures/go/increment-decrement-statements.diff+B.txt
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(IncrementStatement)
|
||||
(IncrementStatement)))+}
|
7
test/fixtures/go/increment-decrement-statements.diff-A.txt
vendored
Normal file
7
test/fixtures/go/increment-decrement-statements.diff-A.txt
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(IncrementStatement)
|
||||
(DecrementStatement)))-}
|
7
test/fixtures/go/increment-decrement-statements.diff-B.txt
vendored
Normal file
7
test/fixtures/go/increment-decrement-statements.diff-B.txt
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(IncrementStatement)
|
||||
(IncrementStatement)))-}
|
26
test/fixtures/go/indexing-expressions.diff+A.txt
vendored
Normal file
26
test/fixtures/go/indexing-expressions.diff+A.txt
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(IndexExpression
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))))+}
|
27
test/fixtures/go/indexing-expressions.diff+B.txt
vendored
Normal file
27
test/fixtures/go/indexing-expressions.diff+B.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))))+}
|
26
test/fixtures/go/indexing-expressions.diff-A.txt
vendored
Normal file
26
test/fixtures/go/indexing-expressions.diff-A.txt
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(IndexExpression
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))))-}
|
27
test/fixtures/go/indexing-expressions.diff-B.txt
vendored
Normal file
27
test/fixtures/go/indexing-expressions.diff-B.txt
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))
|
||||
(Slice
|
||||
(Identifier)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral)
|
||||
(NumberLiteral))))-}
|
19
test/fixtures/go/int-literals.diff+A.txt
vendored
Normal file
19
test/fixtures/go/int-literals.diff+A.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(ParseError
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(Identifier)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))))))+}
|
19
test/fixtures/go/int-literals.diff+B.txt
vendored
Normal file
19
test/fixtures/go/int-literals.diff+B.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{+(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(ParseError
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(Identifier)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))))))+}
|
19
test/fixtures/go/int-literals.diff-A.txt
vendored
Normal file
19
test/fixtures/go/int-literals.diff-A.txt
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{-(Program
|
||||
(Module
|
||||
(Identifier))
|
||||
(Function
|
||||
(Identifier)
|
||||
(Other "const_declaration"
|
||||
(ParseError
|
||||
(VarAssignment
|
||||
(Other "identifier_list"
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(Identifier)))
|
||||
(Assignment
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)
|
||||
(Identifier))
|
||||
(Other "expression_list"
|
||||
(NumberLiteral)))))))-}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user