1
1
mirror of https://github.com/github/semantic.git synced 2024-12-03 00:16:52 +03:00

Merge branch 'master' into diffs-a-la-carte

This commit is contained in:
Rob Rix 2017-05-04 11:02:22 -04:00 committed by GitHub
commit a656a94664
45 changed files with 304 additions and 813 deletions

@ -1 +1 @@
Subproject commit dd1c7953f2b83a86d10a6d34ae20ff11267bc5a2
Subproject commit 04fd77ba80a49c4db32e5063dcabb2de5dbce866

View File

@ -52,7 +52,7 @@ generate_example () {
stack exec semantic diff -- --sexpression $fileA /dev/null > $diffFileRemoveA
status $diffFileAddB
stack exec semantic diff -- --sexpression --no-index /dev/null $fileB > $diffFileAddB
stack exec semantic diff -- --sexpression /dev/null $fileB > $diffFileAddB
status $diffFileRemoveB
stack exec semantic diff -- --sexpression $fileB /dev/null > $diffFileRemoveB

View File

@ -6,7 +6,6 @@ module Command.Files
import Prologue hiding (readFile)
import Source
import qualified Data.ByteString as B
import System.IO hiding (readFile)
import Control.Exception (catch, IOException)
import qualified Data.Text.ICU.Convert as Convert
import qualified Data.Text.ICU.Detect as Detect
@ -14,28 +13,9 @@ import qualified Data.Text.ICU.Detect as Detect
-- | Read a file to a SourceBlob, transcoding to UTF-8 along the way.
readFile :: FilePath -> IO SourceBlob
readFile path = do
source <- (Just <$> readFile' path) `catch` (const (pure Nothing) :: IOException -> IO (Maybe Source))
raw <- (Just <$> B.readFile path) `catch` (const (pure Nothing) :: IOException -> IO (Maybe ByteString))
source <- traverse transcode raw
pure $ fromMaybe (emptySourceBlob path) (flip sourceBlob path <$> source)
where
-- | Read a file and safely handle special paths like /dev/null
readFile' :: FilePath -> IO Source
readFile' path = do
size <- fileSize path
text <- case size of
0 -> pure B.empty
_ -> B.readFile path
transcode text
-- Based on https://github.com/haskell/bytestring/pull/79/files
-- Neccessary to be able to handle /dev/null as a file.
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 return 0 in that case.
filesz <- catch (hFileSize h) useZeroIfNotRegularFile
pure $ fromIntegral filesz `max` 0
where useZeroIfNotRegularFile :: IOException -> IO Integer
useZeroIfNotRegularFile _ = pure 0
-- | Transcode a ByteString to a unicode Source.
transcode :: B.ByteString -> IO Source

View File

@ -22,11 +22,11 @@ data SExpressionFormat = TreeOnly | TreeAndRanges
-- | Returns a ByteString SExpression formatted diff.
sExpression :: (HasField fields Category, HasField fields SourceSpan, Foldable f) => SExpressionFormat -> Both SourceBlob -> Diff f (Record fields) -> ByteString
sExpression format _ diff = printDiff diff 0 format
sExpression format _ diff = printDiff diff 0 format <> "\n"
-- | Returns a ByteString SExpression formatted term.
sExpressionParseTree :: (HasField fields Category, HasField fields SourceSpan, Foldable f) => SExpressionFormat -> SourceBlob -> Term f (Record fields) -> ByteString
sExpressionParseTree format _ term = printTerm term 0 format
sExpressionParseTree format _ term = printTerm term 0 format <> "\n"
printDiff :: (HasField fields Category, HasField fields SourceSpan, Foldable f) => Diff f (Record fields) -> Int -> SExpressionFormat -> ByteString
printDiff diff level format = case runFree diff of

View File

@ -40,7 +40,7 @@ treeSitterParser language grammar blob = do
ts_document_set_language document grammar
withCStringLen (toText (source blob)) $ \ (source, len) -> do
ts_document_set_input_string_with_length document source len
ts_document_parse document
ts_document_parse_halt_on_error document
term <- documentToTerm language document blob
ts_document_free document
pure term
@ -55,7 +55,7 @@ parseRubyToAST source = do
ts_document_set_language document Ruby.tree_sitter_ruby
root <- withCStringLen (toText source) $ \ (source, len) -> do
ts_document_set_input_string_with_length document source len
ts_document_parse document
ts_document_parse_halt_on_error document
alloca (\ rootPtr -> do
ts_document_root_node_p document rootPtr
peek rootPtr)

View File

@ -33,14 +33,14 @@ data ParseFixture = ParseFixture
instance Listable ParseFixture where
tiers = cons0 (ParseFixture (sExpressionParseTree pathMode "" []) sExpressionParseTreeOutput)
\/ cons0 (ParseFixture (jsonParseTree pathMode "" []) jsonParseTreeOutput)
\/ cons0 (ParseFixture (sExpressionParseTree commitMode repo []) "(Program\n (Method\n (Identifier)))")
\/ cons0 (ParseFixture (sExpressionParseTree commitMode repo []) "(Program\n (Method\n (Identifier)))\n")
\/ cons0 (ParseFixture (jsonParseTree commitMode repo []) "[{\"filePath\":\"methods.rb\",\"programNode\":{\"category\":\"Program\",\"children\":[{\"category\":\"Method\",\"identifier\":{\"category\":\"Identifier\",\"identifier\":\"foo\",\"range\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}},\"clauses\":[],\"receiver\":null,\"range\":[0,11],\"callSignature\":[],\"definitions\":[],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,4]}}],\"range\":[0,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}}},[]]\n")
where
pathMode = ParsePaths ["test/fixtures/ruby/and-or.A.rb"]
commitMode = ParseCommit "2e4144eb8c44f007463ec34cb66353f0041161fe" ["methods.rb"]
sExpressionParseTreeOutput = "(Program\n (Binary\n (Identifier)\n (Other \"and\")\n (Identifier)))"
sExpressionParseTreeOutput = "(Program\n (Binary\n (Identifier)\n (Other \"and\")\n (Identifier)))\n"
jsonParseTreeOutput = "[{\"filePath\":\"test/fixtures/ruby/and-or.A.rb\",\"programNode\":{\"category\":\"Program\",\"children\":[{\"operatorSyntaxes\":[{\"category\":\"Identifier\",\"identifier\":\"foo\",\"range\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]}},{\"category\":\"and\",\"identifier\":\"and\",\"range\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}},{\"category\":\"Identifier\",\"identifier\":\"bar\",\"range\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]}}],\"category\":\"Binary\",\"range\":[0,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,12]}}],\"range\":[0,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,1]}}},[]]\n"
@ -75,8 +75,8 @@ instance Listable DiffFixture where
summaryOutput' = "{\"changes\":{\"methods.rb\":[{\"span\":{\"insert\":{\"start\":[1,1],\"end\":[2,4]}},\"summary\":\"Added the 'foo()' method\"}]},\"errors\":{}}\n"
jsonOutput = "{\"oids\":[\"0000000000000000000000000000000000000000\",\"0000000000000000000000000000000000000000\"],\"paths\":[\"test/fixtures/ruby/method-declaration.A.rb\",\"test/fixtures/ruby/method-declaration.B.rb\"],\"rows\":[[{\"category\":\"Program\",\"children\":[{\"category\":\"Method\",\"children\":[{\"replace\":{\"category\":\"Identifier\",\"range\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}}}],\"range\":[0,8],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,4]}}],\"range\":[0,8],\"number\":1,\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},{\"category\":\"Program\",\"children\":[{\"category\":\"Method\",\"children\":[{\"replace\":{\"category\":\"Identifier\",\"range\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}}},{\"insert\":{\"category\":\"Params\",\"children\":[{\"category\":\"Identifier\",\"range\":[8,9],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,10]}}],\"range\":[7,11],\"sourceSpan\":{\"start\":[1,8],\"end\":[2,3]}}}],\"range\":[0,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,4]}}],\"range\":[0,11],\"number\":1,\"sourceSpan\":{\"start\":[1,1],\"end\":[4,1]}}],[{\"category\":\"Program\",\"children\":[{\"category\":\"Method\",\"children\":[{\"insert\":{\"category\":\"Params\",\"children\":[],\"range\":[11,13],\"sourceSpan\":{\"start\":[1,8],\"end\":[2,3]}}},{\"insert\":{\"category\":\"Identifier\",\"range\":[13,16],\"sourceSpan\":{\"start\":[2,3],\"end\":[2,6]}}}],\"range\":[11,17],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,4]}}],\"range\":[11,17],\"number\":2,\"sourceSpan\":{\"start\":[1,1],\"end\":[4,1]}}],[{\"category\":\"Program\",\"children\":[{\"category\":\"Method\",\"children\":[],\"range\":[8,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,4]}}],\"range\":[8,12],\"number\":2,\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},{\"category\":\"Program\",\"children\":[{\"category\":\"Method\",\"children\":[],\"range\":[17,20],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,4]}}],\"range\":[17,21],\"number\":3,\"sourceSpan\":{\"start\":[1,1],\"end\":[4,1]}}],[{\"category\":\"Program\",\"children\":[],\"range\":[12,12],\"number\":3,\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},{\"category\":\"Program\",\"children\":[],\"range\":[21,21],\"number\":4,\"sourceSpan\":{\"start\":[1,1],\"end\":[4,1]}}]]}\n"
jsonOutput' = "{\"oids\":[\"0000000000000000000000000000000000000000\",\"ff7bbbe9495f61d9e1e58c597502d152bab1761e\"],\"paths\":[\"methods.rb\",\"methods.rb\"],\"rows\":[[{\"insert\":{\"category\":\"Program\",\"children\":[{\"category\":\"Method\",\"children\":[{\"category\":\"Identifier\",\"range\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}}],\"range\":[0,8],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,4]}}],\"range\":[0,8],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},\"number\":1}],[{\"insert\":{\"category\":\"Program\",\"children\":[{\"category\":\"Method\",\"children\":[],\"range\":[8,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,4]}}],\"range\":[8,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},\"number\":2}],[{\"insert\":{\"category\":\"Program\",\"children\":[],\"range\":[12,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},\"number\":3}]]}\n"
sExpressionOutput = "(Program\n (Method\n { (Identifier)\n ->(Identifier) }\n {+(Params\n (Identifier))+}\n {+(Identifier)+}))"
sExpressionOutput' = "{+(Program\n (Method\n (Identifier)))+}"
sExpressionOutput = "(Program\n (Method\n { (Identifier)\n ->(Identifier) }\n {+(Params\n (Identifier))+}\n {+(Identifier)+}))\n"
sExpressionOutput' = "{+(Program\n (Method\n (Identifier)))+}\n"
tocOutput = "{\"changes\":{\"test/fixtures/ruby/method-declaration.A.rb -> test/fixtures/ruby/method-declaration.B.rb\":[{\"span\":{\"start\":[1,1],\"end\":[3,4]},\"category\":\"Method\",\"term\":\"bar\",\"changeType\":\"modified\"}]},\"errors\":{}}\n"
tocOutput' = "{\"changes\":{\"methods.rb\":[{\"span\":{\"start\":[1,1],\"end\":[2,4]},\"category\":\"Method\",\"term\":\"foo\",\"changeType\":\"added\"}]},\"errors\":{}}\n"

View File

@ -23,7 +23,7 @@ spec = parallel $ do
describe "parseBlobs" $ do
it "renders to ByteString output" $ do
output <- parseBlobs (SExpressionParseTreeRenderer TreeOnly) [methodsBlob]
output `shouldBe` "(Program\n (Method\n (Identifier)))"
output `shouldBe` "(Program\n (Method\n (Identifier)))\n"
where
methodsBlob = SourceBlob (Source "def foo\nend\n") "ff7bbbe9495f61d9e1e58c597502d152bab1761e" "methods.rb" (Just defaultPlainBlob)

View File

@ -1,38 +1,6 @@
{+(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))+}
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))+}

View File

@ -1,38 +1,6 @@
{+(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))+}
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))+}

View File

@ -1,38 +1,6 @@
{-(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))-}
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))-}

View File

@ -1,38 +1,6 @@
{-(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))-}
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))-}

View File

@ -1,42 +1,7 @@
(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
{ (Identifier)
->(Identifier) })))
(Function
{ (Identifier)
->(Identifier) }
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
{ (Identifier)
->(Identifier) }
(Args)
(Args
(Identifier)
(Identifier)))
(Function
{ (Identifier)
->(Identifier) }
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))
(Module
(Identifier))
(Identifier)
(Args)
{ (Identifier)
->(Identifier) })

View File

@ -1,42 +1,7 @@
(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
{ (Identifier)
->(Identifier) })))
(Function
{ (Identifier)
->(Identifier) }
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
{ (Identifier)
->(Identifier) }
(Args)
(Args
(Identifier)
(Identifier)))
(Function
{ (Identifier)
->(Identifier) }
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))
(Module
(Identifier))
(Identifier)
(Args)
{ (Identifier)
->(Identifier) })

View File

@ -1,38 +1,6 @@
(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))

View File

@ -1,38 +1,6 @@
(ParseError
(Program
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(FunctionCall
(Identifier))))
(Function
(Identifier)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(Identifier)
(Identifier)
(ParameterDecl
(Identifier)
(Identifier)))
(Identifier))
(Function
(Identifier)
(Args)
(Args
(Identifier)
(Identifier)))
(Function
(Identifier)
(Args)
(Args
(ParameterDecl
(Identifier)
(Identifier))
(ParameterDecl
(Identifier)
(Identifier))))))
(Module
(Identifier))
(Identifier)
(Args)
(Identifier))

View File

@ -1,24 +1,15 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeDecl
(Identifier)
(Args)
(Other "type_declaration"
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier)
(Identifier))
(Args
(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))))))))+}
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier)))+}

View File

@ -1,24 +1,15 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeDecl
(Identifier)
(Args)
(Other "type_declaration"
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier)
(Identifier))
(Args
(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))))))))-}
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier)))-}

View File

@ -1,4 +1,4 @@
(Program
{ (Program
(Module
(Identifier))
(Function
@ -6,26 +6,31 @@
(Args)
(Other "type_declaration"
(TypeDecl
{ (Identifier)
->(Identifier) }
(Identifier)
(FunctionTy
(Args
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }))
(Identifier))
(Identifier)))
(TypeDecl
{ (Identifier)
->(Identifier) }
(Identifier)
(FunctionTy
(Args
{-(Identifier)-}
(Identifier)
{+(Identifier)+})
(Identifier))
(Args
{+(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))+}
{-(Identifier)-}
{-(Identifier)-}))))))
(Identifier)
(Identifier)))))))->(ParseError
(Module
(Identifier))
(Identifier)
(Args)
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier))) }

View File

@ -1,4 +1,18 @@
(Program
{ (ParseError
(Module
(Identifier))
(Identifier)
(Args)
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier)))->(Program
(Module
(Identifier))
(Function
@ -6,26 +20,17 @@
(Args)
(Other "type_declaration"
(TypeDecl
{ (Identifier)
->(Identifier) }
(Identifier)
(FunctionTy
(Args
{ (Identifier)
->(Identifier) })
{ (Identifier)
->(Identifier) }))
(Identifier))
(Identifier)))
(TypeDecl
{ (Identifier)
->(Identifier) }
(Identifier)
(FunctionTy
(Args
{-(Identifier)-}
(Identifier)
{+(Identifier)+})
(Identifier))
(Args
{+(Identifier)+}
{+(Identifier)+}
{-(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))-}))))))
(Identifier)
(Identifier))))))) }

View File

@ -1,24 +1,15 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeDecl
(Identifier)
(Args)
(Other "type_declaration"
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier))
(Identifier)))
(TypeDecl
(Identifier)
(FunctionTy
(Args
(Identifier)
(Identifier))
(Args
(ParameterDecl
(ChannelTy
(ParseError)
(Identifier)))))))))
(FunctionTy
(Args
(Identifier))
(Identifier)))
(Identifier)
(Args
(Identifier)
(Identifier)))

View File

@ -1,14 +1,8 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))+}
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))+}

View File

@ -1,14 +1,8 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))+}
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))+}

View File

@ -1,14 +1,8 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))-}
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))-}

View File

@ -1,14 +1,8 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))-}
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))-}

View File

@ -1,17 +1,10 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
{ (StringLiteral)
->(StringLiteral) }
(ParseError
{ (StringLiteral)
->(StringLiteral) }
(Import
(Identifier)
{ (StringLiteral)
->(StringLiteral) })))))
(Identifier)
(Args)
(Identifier)
{ (StringLiteral)
->(StringLiteral) }
{ (StringLiteral)
->(StringLiteral) })

View File

@ -1,17 +1,10 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
{ (StringLiteral)
->(StringLiteral) }
(ParseError
{ (StringLiteral)
->(StringLiteral) }
(Import
(Identifier)
{ (StringLiteral)
->(StringLiteral) })))))
(Identifier)
(Args)
(Identifier)
{ (StringLiteral)
->(StringLiteral) }
{ (StringLiteral)
->(StringLiteral) })

View File

@ -1,14 +1,8 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))

View File

@ -1,14 +1,8 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(TypeConversion
(Identifier)
(StringLiteral)
(ParseError
(StringLiteral)
(Import
(Identifier)
(StringLiteral))))))
(Identifier)
(Args)
(Identifier)
(StringLiteral)
(StringLiteral))

View File

@ -1,20 +1,11 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))+}
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))+}

View File

@ -1,20 +1,11 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))+}
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))+}

View File

@ -1,20 +1,11 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))-}
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))-}

View File

@ -1,20 +1,11 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))-}
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))-}

View File

@ -1,23 +1,12 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier)))
(Assignment
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }))))))
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier))))

View File

@ -1,23 +1,12 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier)))
(Assignment
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }))))))
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
{ (NumberLiteral)
->(NumberLiteral) }
(Identifier))))

View File

@ -1,20 +1,11 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))

View File

@ -1,20 +1,11 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(Other "const_declaration"
(ParseError
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier)))
(Assignment
(Other "expression_list"
(NumberLiteral)
(Identifier))
(Other "expression_list"
(NumberLiteral)))))))
(Identifier)
(Args)
(VarAssignment
(Other "identifier_list"
(Identifier))
(Other "expression_list"
(NumberLiteral)
(Identifier))))

View File

@ -1,17 +1,7 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))+}
(Identifier)
(Args)
(Identifier)
(StringLiteral))+}

View File

@ -1,17 +1,7 @@
{+(Program
{+(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))+}
(Identifier)
(Args)
(Identifier)
(StringLiteral))+}

View File

@ -1,17 +1,7 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))-}
(Identifier)
(Args)
(Identifier)
(StringLiteral))-}

View File

@ -1,17 +1,7 @@
{-(Program
{-(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))-}
(Identifier)
(Args)
(Identifier)
(StringLiteral))-}

View File

@ -1,20 +1,8 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
{ (StringLiteral)
->(StringLiteral) }
(ParseError
(Identifier))
{ (StringLiteral)
->(StringLiteral) }
(Identifier)
(ParseError
(Import
(Identifier)
{ (StringLiteral)
->(StringLiteral) }))))
(Identifier)
(Args)
(Identifier)
{ (StringLiteral)
->(StringLiteral) })

View File

@ -1,20 +1,8 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
{ (StringLiteral)
->(StringLiteral) }
(ParseError
(Identifier))
{ (StringLiteral)
->(StringLiteral) }
(Identifier)
(ParseError
(Import
(Identifier)
{ (StringLiteral)
->(StringLiteral) }))))
(Identifier)
(Args)
(Identifier)
{ (StringLiteral)
->(StringLiteral) })

View File

@ -1,17 +1,7 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))
(Identifier)
(Args)
(Identifier)
(StringLiteral))

View File

@ -1,17 +1,7 @@
(Program
(ParseError
(Module
(Identifier))
(Function
(Identifier)
(Args)
(ParseError
(Identifier))
(StringLiteral)
(ParseError
(Identifier))
(StringLiteral)
(Identifier)
(ParseError
(Import
(Identifier)
(StringLiteral)))))
(Identifier)
(Args)
(Identifier)
(StringLiteral))

@ -1 +1 @@
Subproject commit 1b1685f3046f82f8d509e691ecfb4f4d09238cb3
Subproject commit 11361887f9d17170293413bf2717b724dc48fac8