1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Merge pull request #1899 from github/enhanced-json-output

Enhanced json output
This commit is contained in:
Timothy Clem 2018-05-30 12:23:02 -07:00 committed by GitHub
commit a42d0310bd
649 changed files with 2358 additions and 2351 deletions

View File

@ -29,7 +29,6 @@ library
, Analysis.CyclomaticComplexity
, Analysis.Decorator
, Analysis.Declaration
, Analysis.IdentifierName
, Analysis.PackageDef
-- Semantic assignment
, Assigning.Assignment

View File

@ -1,32 +1,11 @@
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances #-}
module Analysis.ConstructorName
( ConstructorName(..)
, ConstructorLabel(..)
, constructorLabel
) where
import Data.Aeson
import Data.ByteString.Char8 (ByteString, pack, unpack)
import Data.JSON.Fields
import Data.Sum
import Data.Term
import Data.Text.Encoding (decodeUtf8)
import Prologue
-- | Compute a 'ConstructorLabel' label for a 'Term'.
constructorLabel :: ConstructorName syntax => TermF syntax a b -> ConstructorLabel
constructorLabel (In _ s) = ConstructorLabel $ pack (constructorName s)
newtype ConstructorLabel = ConstructorLabel { unConstructorLabel :: ByteString }
instance Show ConstructorLabel where
showsPrec _ (ConstructorLabel s) = showString (unpack s)
instance ToJSONFields ConstructorLabel where
toJSONFields (ConstructorLabel s) = [ "category" .= decodeUtf8 s ]
-- | A typeclass to retrieve the name of the data constructor for a value.
--
-- This typeclass employs the Advanced Overlap techniques designed by Oleg Kiselyov & Simon Peyton Jones: https://wiki.haskell.org/GHC/AdvancedOverlap; see also src/Analysis/Declaration.hs for discussion of the details of the mechanism.
@ -40,8 +19,7 @@ instance Apply ConstructorName fs => ConstructorNameWithStrategy 'Custom (Sum fs
constructorNameWithStrategy _ = apply @ConstructorName constructorName
instance ConstructorNameWithStrategy 'Custom [] where
constructorNameWithStrategy _ [] = "[]"
constructorNameWithStrategy _ _ = ""
constructorNameWithStrategy _ _ = "Statements"
data Strategy = Default | Custom

View File

@ -1,60 +0,0 @@
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, TypeOperators, UndecidableInstances #-}
module Analysis.IdentifierName
( IdentifierName(..)
, IdentifierLabel(..)
, identifierLabel
) where
import Data.Abstract.Name (unName)
import Data.Aeson
import Data.JSON.Fields
import Data.Sum
import qualified Data.Syntax
import Data.Term
import Data.Text.Encoding (decodeUtf8)
import Prologue
-- | Compute a 'IdentifierLabel' label for a 'Term'.
identifierLabel :: IdentifierName syntax => TermF syntax a b -> Maybe IdentifierLabel
identifierLabel (In _ s) = IdentifierLabel <$> identifierName s
newtype IdentifierLabel = IdentifierLabel ByteString
deriving (Show)
instance ToJSONFields IdentifierLabel where
toJSONFields (IdentifierLabel s) = [ "name" .= decodeUtf8 s ]
-- | A typeclass to retrieve the name of syntax identifiers.
--
-- This typeclass employs the Advanced Overlap techniques designed by Oleg Kiselyov & Simon Peyton Jones: https://wiki.haskell.org/GHC/AdvancedOverlap; see also src/Analysis/Declaration.hs for discussion of the details of the mechanism.
class IdentifierName syntax where
identifierName :: syntax a -> Maybe ByteString
instance (IdentifierNameStrategy syntax ~ strategy, IdentifierNameWithStrategy strategy syntax) => IdentifierName syntax where
identifierName = identifierNameWithStrategy (Proxy :: Proxy strategy)
class CustomIdentifierName syntax where
customIdentifierName :: syntax a -> Maybe ByteString
instance Apply IdentifierName fs => CustomIdentifierName (Sum fs) where
customIdentifierName = apply @IdentifierName identifierName
instance CustomIdentifierName Data.Syntax.Identifier where
customIdentifierName (Data.Syntax.Identifier name) = Just (unName name)
data Strategy = Default | Custom
type family IdentifierNameStrategy syntax where
IdentifierNameStrategy (Sum _) = 'Custom
IdentifierNameStrategy Data.Syntax.Identifier = 'Custom
IdentifierNameStrategy syntax = 'Default
class IdentifierNameWithStrategy (strategy :: Strategy) syntax where
identifierNameWithStrategy :: proxy strategy -> syntax a -> Maybe ByteString
instance IdentifierNameWithStrategy 'Default syntax where
identifierNameWithStrategy _ _ = Nothing
instance (CustomIdentifierName syntax) => IdentifierNameWithStrategy 'Custom syntax where
identifierNameWithStrategy _ = customIdentifierName

View File

@ -6,11 +6,12 @@ module Data.Abstract.Name
, unName
) where
import Data.Aeson
import qualified Data.ByteString.Char8 as BC
import qualified Data.Char as Char
import Data.String
import qualified Data.Text as Text
import qualified Data.Text.Encoding as Text
import Data.String
import Prologue
-- | The type of variable names.
@ -53,3 +54,7 @@ instance Show Name where
instance Hashable Name where
hashWithSalt salt (Name name) = hashWithSalt salt name
hashWithSalt salt (I i) = salt `hashWithSalt` (1 :: Int) `hashWithSalt` i
instance ToJSON Name where
toJSON = toJSON . Text.decodeUtf8 . unName
toEncoding = toEncoding . Text.decodeUtf8 . unName

View File

@ -1,4 +1,5 @@
{-# LANGUAGE DefaultSignatures, MultiParamTypeClasses, TypeOperators, UndecidableInstances #-}
{-# LANGUAGE DefaultSignatures, MultiParamTypeClasses, TypeOperators, UndecidableInstances, GADTs #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} -- FIXME
module Data.JSON.Fields
( JSONFields (..)
, JSONFields1 (..)
@ -9,17 +10,20 @@ module Data.JSON.Fields
, withChildren
) where
import Data.Aeson
import Data.Sum (Apply(..), Sum)
import Prologue
import Data.Aeson
import Data.Sum (Apply (..), Sum)
import qualified Data.Text as Text
import qualified Data.Text.Encoding as Text
import Prologue
class ToJSONFields a where
toJSONFields :: KeyValue kv => a -> [kv]
class ToJSONFields1 f where
toJSONFields1 :: (KeyValue kv, ToJSON a) => f a -> [kv]
default toJSONFields1 :: (KeyValue kv, ToJSON a, Foldable f) => f a -> [kv]
toJSONFields1 f = ["children" .= toList f]
default toJSONFields1 :: (KeyValue kv, ToJSON a, GToJSONFields1 (Rep1 f), GConstructorName1 (Rep1 f), Generic1 f) => f a -> [kv]
toJSONFields1 s = let r = from1 s in
"term" .= gconstructorName1 r : gtoJSONFields1 r
withChildren :: (KeyValue kv, ToJSON a, Foldable f) => f a -> [kv] -> [kv]
withChildren f ks = ("children" .= toList f) : ks
@ -67,3 +71,82 @@ instance (ToJSON a, ToJSONFields1 f) => ToJSONFields (JSONFields1 f a) where
instance (ToJSON a, ToJSONFields1 f) => ToJSON (JSONFields1 f a) where
toJSON = object . toJSONFields1 . unJSONFields1
toEncoding = pairs . mconcat . toJSONFields1 . unJSONFields1
-- | A typeclass to retrieve the name of a data constructor.
class GConstructorName1 f where
gconstructorName1 :: f a -> String
instance Apply GConstructorName1 fs => GConstructorName1 (Sum fs) where
gconstructorName1 = apply @GConstructorName1 gconstructorName1
instance GConstructorName1 f => GConstructorName1 (M1 D c f) where
gconstructorName1 = gconstructorName1 . unM1
instance Constructor c => GConstructorName1 (M1 C c f) where
gconstructorName1 = conName
instance (GConstructorName1 f, GConstructorName1 g) => GConstructorName1 (f :+: g) where
gconstructorName1 (L1 l) = gconstructorName1 l
gconstructorName1 (R1 r) = gconstructorName1 r
-- | A typeclass to calculate a list of 'KeyValue's describing the record selector names and associated values on a datatype.
class GToJSONFields1 f where
gtoJSONFields1 :: (KeyValue kv, ToJSON a) => f a -> [kv]
instance GToJSONFields1 f => GToJSONFields1 (M1 D c f) where
gtoJSONFields1 = gtoJSONFields1 . unM1
instance GToJSONFields1 f => GToJSONFields1 (M1 C c f) where
gtoJSONFields1 = gtoJSONFields1 . unM1
instance GToJSONFields1 U1 where
gtoJSONFields1 _ = []
instance (Selector c, GSelectorJSONValue1 f) => GToJSONFields1 (M1 S c f) where
gtoJSONFields1 m1 = case selName m1 of
"" -> [ "children" .= json ]
n -> [ Text.pack n .= json ]
where json = gselectorJSONValue1 (unM1 m1)
instance (GToJSONFields1 f, GToJSONFields1 g) => GToJSONFields1 (f :+: g) where
gtoJSONFields1 (L1 l) = gtoJSONFields1 l
gtoJSONFields1 (R1 r) = gtoJSONFields1 r
instance (GToJSONFields1 f, GToJSONFields1 g) => GToJSONFields1 (f :*: g) where
gtoJSONFields1 (x :*: y) = gtoJSONFields1 x <> gtoJSONFields1 y
-- | A typeclass to retrieve the JSON 'Value' of a record selector.
class GSelectorJSONValue1 f where
gselectorJSONValue1 :: ToJSON a => f a -> SomeJSON
instance GSelectorJSONValue1 Par1 where
gselectorJSONValue1 = SomeJSON . unPar1
instance ToJSON1 f => GSelectorJSONValue1 (Rec1 f) where
gselectorJSONValue1 = SomeJSON . SomeJSON1 . unRec1
instance ToJSON k => GSelectorJSONValue1 (K1 r k) where
gselectorJSONValue1 = SomeJSON . unK1
-- TODO: Fix this orphan instance.
instance ToJSON ByteString where
toJSON = toJSON . Text.decodeUtf8
toEncoding = toEncoding . Text.decodeUtf8
data SomeJSON where
SomeJSON :: ToJSON a => a -> SomeJSON
instance ToJSON SomeJSON where
toJSON (SomeJSON a) = toJSON a
toEncoding (SomeJSON a) = toEncoding a
data SomeJSON1 where
SomeJSON1 :: (ToJSON1 f, ToJSON a) => f a -> SomeJSON1
instance ToJSON SomeJSON1 where
toJSON (SomeJSON1 fa) = toJSON1 fa
toEncoding (SomeJSON1 fa) = toEncoding1 fa

View File

@ -101,16 +101,13 @@ infixContext context left right operators = uncurry (&) <$> postContextualizeThr
-- Common
-- | An identifier of some other construct, whether a containing declaration (e.g. a class name) or a reference (e.g. a variable).
newtype Identifier a = Identifier Name
deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Mergeable, Ord, Show, Traversable)
newtype Identifier a = Identifier { name :: Name }
deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Mergeable, Ord, Show, Traversable, ToJSONFields1)
instance Eq1 Identifier where liftEq = genericLiftEq
instance Ord1 Identifier where liftCompare = genericLiftCompare
instance Show1 Identifier where liftShowsPrec = genericLiftShowsPrec
-- Propagating the identifier name into JSON is handled with the IdentifierName analysis.
instance ToJSONFields1 Identifier
instance Evaluatable Identifier where
eval (Identifier name) = pure (LvalLocal name)
@ -120,28 +117,26 @@ instance FreeVariables1 Identifier where
instance Declarations1 Identifier where
liftDeclaredName _ (Identifier x) = pure x
newtype Program a = Program [a]
deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Mergeable, Ord, Show, Traversable, FreeVariables1, Declarations1)
deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Mergeable, Ord, Show, Traversable, FreeVariables1, Declarations1, ToJSONFields1)
instance Eq1 Program where liftEq = genericLiftEq
instance Ord1 Program where liftCompare = genericLiftCompare
instance Show1 Program where liftShowsPrec = genericLiftShowsPrec
instance ToJSONFields1 Program
instance Evaluatable Program where
eval (Program xs) = eval xs
-- | An accessibility modifier, e.g. private, public, protected, etc.
newtype AccessibilityModifier a = AccessibilityModifier ByteString
deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Mergeable, Ord, Show, Traversable, FreeVariables1, Declarations1)
deriving (Diffable, Eq, Foldable, Functor, Generic1, Hashable1, Mergeable, Ord, Show, Traversable, FreeVariables1, Declarations1, ToJSONFields1)
instance Eq1 AccessibilityModifier where liftEq = genericLiftEq
instance Ord1 AccessibilityModifier where liftCompare = genericLiftCompare
instance Show1 AccessibilityModifier where liftShowsPrec = genericLiftShowsPrec
instance ToJSONFields1 AccessibilityModifier
-- TODO: Implement Eval instance for AccessibilityModifier
instance Evaluatable AccessibilityModifier

View File

@ -121,7 +121,7 @@ instance (ToJSONFields a, ToJSONFields1 f) => ToJSONFields (Term f a) where
toJSONFields = toJSONFields . unTerm
instance (ToJSON b, ToJSONFields a, ToJSONFields1 f) => ToJSONFields (TermF f a b) where
toJSONFields (In a f) = toJSONFields a <> toJSONFields1 f
toJSONFields (In a f) = toJSONFields1 f <> toJSONFields a
instance (ToJSON b, ToJSONFields a, ToJSONFields1 f) => ToJSON (TermF f a b) where
toJSON = object . toJSONFields

View File

@ -5,6 +5,7 @@ import Data.Abstract.Evaluatable
import Data.Abstract.Module
import qualified Data.Abstract.Package as Package
import Data.Abstract.Path
import Data.Aeson
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.JSON.Fields
@ -13,10 +14,10 @@ import Prologue
import System.FilePath.Posix
data Relative = Relative | NonRelative
deriving (Eq, Generic, Hashable, Ord, Show)
deriving (Eq, Generic, Hashable, Ord, Show, ToJSON)
data ImportPath = ImportPath { unPath :: FilePath, pathIsRelative :: Relative }
deriving (Eq, Generic, Hashable, Ord, Show)
deriving (Eq, Generic, Hashable, Ord, Show, ToJSON)
importPath :: ByteString -> ImportPath
importPath str = let path = stripQuotes str in ImportPath (BC.unpack path) (pathType path)

View File

@ -4,23 +4,24 @@ module Language.Python.Syntax where
import Data.Abstract.Environment as Env
import Data.Abstract.Evaluatable
import Data.Abstract.Module
import qualified Data.ByteString.Char8 as BC
import Data.Aeson
import Data.Functor.Classes.Generic
import Data.JSON.Fields
import qualified Data.Language as Language
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Semigroup.Reducer as Reducer
import Data.Mergeable
import Diffing.Algorithm
import GHC.Generics
import Prelude hiding (fail)
import Prologue
import System.FilePath.Posix
import qualified Data.ByteString.Char8 as BC
import qualified Data.Language as Language
import qualified Data.List.NonEmpty as NonEmpty
import qualified Data.Semigroup.Reducer as Reducer
data QualifiedName
= QualifiedName (NonEmpty FilePath)
| RelativeQualifiedName FilePath (Maybe QualifiedName)
deriving (Eq, Generic, Hashable, Ord, Show)
deriving (Eq, Generic, Hashable, Ord, Show, ToJSON)
qualifiedName :: NonEmpty ByteString -> QualifiedName
qualifiedName xs = QualifiedName (BC.unpack <$> xs)

View File

@ -6,6 +6,7 @@ import Data.Abstract.Evaluatable
import qualified Data.Abstract.Module as M
import Data.Abstract.Package
import Data.Abstract.Path
import Data.Aeson
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
import Data.JSON.Fields
@ -18,10 +19,10 @@ import Prologue
import System.FilePath.Posix
data Relative = Relative | NonRelative
deriving (Eq, Generic, Hashable, Ord, Show)
deriving (Eq, Generic, Hashable, Ord, Show, ToJSON)
data ImportPath = ImportPath { unPath :: FilePath, pathIsRelative :: Relative }
deriving (Eq, Generic, Hashable, Ord, Show)
deriving (Eq, Generic, Hashable, Ord, Show, ToJSON)
importPath :: ByteString -> ImportPath
importPath str = let path = stripQuotes str in ImportPath (BC.unpack path) (pathType path)

View File

@ -52,8 +52,8 @@ data JSONTerm a = JSONTerm { jsonTermBlob :: Blob, jsonTerm :: a }
deriving (Eq, Show)
instance ToJSON a => ToJSON (JSONTerm a) where
toJSON JSONTerm{..} = object ("programNode" .= jsonTerm : toJSONFields jsonTermBlob)
toEncoding JSONTerm{..} = pairs (fold ("programNode" .= jsonTerm : toJSONFields jsonTermBlob))
toJSON JSONTerm{..} = object ("tree" .= jsonTerm : toJSONFields jsonTermBlob)
toEncoding JSONTerm{..} = pairs (fold ("tree" .= jsonTerm : toJSONFields jsonTermBlob))
renderJSONAST :: ToJSON a => Blob -> a -> JSON "trees" SomeJSON

View File

@ -1,8 +1,7 @@
{-# LANGUAGE ConstraintKinds, GADTs, RankNTypes, ScopedTypeVariables #-}
module Semantic.Diff where
import Analysis.ConstructorName (ConstructorName, constructorLabel)
import Analysis.IdentifierName (IdentifierName, identifierLabel)
import Analysis.ConstructorName (ConstructorName)
import Analysis.Declaration (HasDeclaration, declarationAlgebra)
import Data.AST
import Data.Blob
@ -22,7 +21,7 @@ import Serializing.Format
runDiff :: (Member (Distribute WrappedTask) effs, Member Task effs) => DiffRenderer output -> [BlobPair] -> Eff effs Builder
runDiff ToCDiffRenderer = withParsedBlobPairs (decorate . declarationAlgebra) (render . renderToCDiff) >=> serialize JSON
runDiff JSONDiffRenderer = withParsedBlobPairs (const (decorate constructorLabel >=> decorate identifierLabel)) (render . renderJSONDiff) >=> serialize JSON
runDiff JSONDiffRenderer = withParsedBlobPairs (const pure) (render . renderJSONDiff) >=> serialize JSON
runDiff SExpressionDiffRenderer = withParsedBlobPairs (const pure) (const (serialize (SExpression ByConstructorName)))
runDiff ShowDiffRenderer = withParsedBlobPairs (const pure) (const (serialize Show))
runDiff DOTDiffRenderer = withParsedBlobPairs (const pure) (const (render renderTreeGraph)) >=> serialize (DOT (diffStyle "diffs"))
@ -36,7 +35,7 @@ withSomeTermPair with (SomeTermPair terms) = with terms
diffBlobTOCPairs :: Member (Distribute WrappedTask) effs => [BlobPair] -> Eff effs ([TOCSummary], [TOCSummary])
diffBlobTOCPairs = withParsedBlobPairs (decorate . declarationAlgebra) (render . renderRPCToCDiff)
type CanDiff syntax = (ConstructorName syntax, Diffable syntax, Eq1 syntax, HasDeclaration syntax, IdentifierName syntax, Hashable1 syntax, Show1 syntax, ToJSONFields1 syntax, Traversable syntax)
type CanDiff syntax = (ConstructorName syntax, Diffable syntax, Eq1 syntax, HasDeclaration syntax, Hashable1 syntax, Show1 syntax, ToJSONFields1 syntax, Traversable syntax)
withParsedBlobPairs :: (Member (Distribute WrappedTask) effs, Monoid output)
=> (forall syntax . CanDiff syntax => Blob -> Term syntax (Record Location) -> TaskEff (Term syntax (Record fields)))
@ -53,8 +52,8 @@ withParsedBlobPairs decorate render = distributeFoldMap (\ blobs -> WrapTask (wi
withParsedBlobPair :: (Member (Distribute WrappedTask) effs, Member (Exc SomeException) effs)
=> (forall syntax . (CanDiff syntax) => Blob -> Term syntax (Record Location) -> TaskEff (Term syntax (Record fields)))
-> BlobPair
-> Eff effs (SomeTermPair '[ConstructorName, Diffable, Eq1, HasDeclaration, Hashable1, IdentifierName, Show1, ToJSONFields1, Traversable] (Record fields))
-> Eff effs (SomeTermPair '[ConstructorName, Diffable, Eq1, HasDeclaration, Hashable1, Show1, ToJSONFields1, Traversable] (Record fields))
withParsedBlobPair decorate blobs
| Just (SomeParser parser) <- someParser @'[ConstructorName, Diffable, Eq1, HasDeclaration, Hashable1, IdentifierName, Show1, ToJSONFields1, Traversable] <$> languageForBlobPair blobs
| Just (SomeParser parser) <- someParser @'[ConstructorName, Diffable, Eq1, HasDeclaration, Hashable1, Show1, ToJSONFields1, Traversable] <$> languageForBlobPair blobs
= SomeTermPair <$> distributeFor blobs (\ blob -> WrapTask (parse parser blob >>= decorate blob))
| otherwise = noLanguageForBlob (pathForBlobPair blobs)

View File

@ -1,8 +1,7 @@
{-# LANGUAGE GADTs, RankNTypes #-}
module Semantic.Parse where
import Analysis.ConstructorName (ConstructorName, constructorLabel)
import Analysis.IdentifierName (IdentifierName, identifierLabel)
import Analysis.ConstructorName (ConstructorName)
import Analysis.Declaration (HasDeclaration, declarationAlgebra)
import Analysis.PackageDef (HasPackageDef, packageDefAlgebra)
import Data.AST
@ -19,7 +18,7 @@ import Semantic.Task
import Serializing.Format
runParse :: (Member (Distribute WrappedTask) effs, Member Task effs) => TermRenderer output -> [Blob] -> Eff effs Builder
runParse JSONTermRenderer = withParsedBlobs (\ blob -> decorate constructorLabel >=> decorate identifierLabel >=> render (renderJSONTerm blob)) >=> serialize JSON
runParse JSONTermRenderer = withParsedBlobs (render . renderJSONTerm) >=> serialize JSON
runParse SExpressionTermRenderer = withParsedBlobs (const (serialize (SExpression ByConstructorName)))
runParse ShowTermRenderer = withParsedBlobs (const (serialize Show))
runParse TagsTermRenderer = withParsedBlobs (\ blob -> decorate (declarationAlgebra blob) >=> render (renderToTags blob)) >=> serialize JSON
@ -27,8 +26,8 @@ runParse ImportsTermRenderer = withParsedBlobs (\ blob -> decorate (dec
runParse (SymbolsTermRenderer fields) = withParsedBlobs (\ blob -> decorate (declarationAlgebra blob) >=> render (renderSymbolTerms . renderToSymbols fields blob)) >=> serialize JSON
runParse DOTTermRenderer = withParsedBlobs (const (render renderTreeGraph)) >=> serialize (DOT (termStyle "terms"))
withParsedBlobs :: (Member (Distribute WrappedTask) effs, Monoid output) => (forall syntax . (ConstructorName syntax, Foldable syntax, Functor syntax, HasDeclaration syntax, HasPackageDef syntax, IdentifierName syntax, Show1 syntax, ToJSONFields1 syntax) => Blob -> Term syntax (Record Location) -> TaskEff output) -> [Blob] -> Eff effs output
withParsedBlobs :: (Member (Distribute WrappedTask) effs, Monoid output) => (forall syntax . (ConstructorName syntax, Foldable syntax, Functor syntax, HasDeclaration syntax, HasPackageDef syntax, Show1 syntax, ToJSONFields1 syntax) => Blob -> Term syntax (Record Location) -> TaskEff output) -> [Blob] -> Eff effs output
withParsedBlobs render = distributeFoldMap (\ blob -> WrapTask (parseSomeBlob blob >>= withSomeTerm (render blob)))
parseSomeBlob :: (Member (Exc SomeException) effs, Member Task effs) => Blob -> Eff effs (SomeTerm '[ConstructorName, Foldable, Functor, HasDeclaration, HasPackageDef, IdentifierName, Show1, ToJSONFields1] (Record Location))
parseSomeBlob :: (Member (Exc SomeException) effs, Member Task effs) => Blob -> Eff effs (SomeTerm '[ConstructorName, Foldable, Functor, HasDeclaration, HasPackageDef, Show1, ToJSONFields1] (Record Location))
parseSomeBlob blob@Blob{..} = maybe (noLanguageForBlob blobPath) (flip parse blob . someParser) blobLanguage

View File

@ -41,8 +41,8 @@ parseFixtures =
pathMode' = [File "test/fixtures/ruby/corpus/and-or.A.rb" (Just Ruby), File "test/fixtures/ruby/corpus/and-or.B.rb" (Just Ruby)]
sExpressionParseTreeOutput = "(Program\n (LowAnd\n (Send\n (Identifier))\n (Send\n (Identifier))))\n"
jsonParseTreeOutput = "{\"trees\":[{\"programNode\":{\"category\":\"Program\",\"sourceRange\":[0,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,1]},\"children\":[{\"category\":\"LowAnd\",\"sourceRange\":[0,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,12]},\"children\":[{\"category\":\"Send\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]},\"children\":[{\"name\":\"foo\",\"category\":\"Identifier\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]},\"children\":[]}]},{\"category\":\"Send\",\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]},\"children\":[{\"name\":\"bar\",\"category\":\"Identifier\",\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]},\"children\":[]}]}]}]},\"path\":\"test/fixtures/ruby/corpus/and-or.A.rb\",\"language\":\"Ruby\"}]}\n"
jsonParseTreeOutput' = "{\"trees\":[{\"programNode\":{\"category\":\"Program\",\"sourceRange\":[0,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,1]},\"children\":[{\"category\":\"LowAnd\",\"sourceRange\":[0,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,12]},\"children\":[{\"category\":\"Send\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]},\"children\":[{\"name\":\"foo\",\"category\":\"Identifier\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]},\"children\":[]}]},{\"category\":\"Send\",\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]},\"children\":[{\"name\":\"bar\",\"category\":\"Identifier\",\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]},\"children\":[]}]}]}]},\"path\":\"test/fixtures/ruby/corpus/and-or.A.rb\",\"language\":\"Ruby\"},{\"programNode\":{\"category\":\"Program\",\"sourceRange\":[0,24],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]},\"children\":[{\"category\":\"LowOr\",\"sourceRange\":[0,10],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,11]},\"children\":[{\"category\":\"Send\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]},\"children\":[{\"name\":\"foo\",\"category\":\"Identifier\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]},\"children\":[]}]},{\"category\":\"Send\",\"sourceRange\":[7,10],\"sourceSpan\":{\"start\":[1,8],\"end\":[1,11]},\"children\":[{\"name\":\"bar\",\"category\":\"Identifier\",\"sourceRange\":[7,10],\"sourceSpan\":{\"start\":[1,8],\"end\":[1,11]},\"children\":[]}]}]},{\"category\":\"LowAnd\",\"sourceRange\":[11,23],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,13]},\"children\":[{\"category\":\"LowOr\",\"sourceRange\":[11,17],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,7]},\"children\":[{\"category\":\"Send\",\"sourceRange\":[11,12],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,2]},\"children\":[{\"name\":\"a\",\"category\":\"Identifier\",\"sourceRange\":[11,12],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,2]},\"children\":[]}]},{\"category\":\"Send\",\"sourceRange\":[16,17],\"sourceSpan\":{\"start\":[2,6],\"end\":[2,7]},\"children\":[{\"name\":\"b\",\"category\":\"Identifier\",\"sourceRange\":[16,17],\"sourceSpan\":{\"start\":[2,6],\"end\":[2,7]},\"children\":[]}]}]},{\"category\":\"Send\",\"sourceRange\":[22,23],\"sourceSpan\":{\"start\":[2,12],\"end\":[2,13]},\"children\":[{\"name\":\"c\",\"category\":\"Identifier\",\"sourceRange\":[22,23],\"sourceSpan\":{\"start\":[2,12],\"end\":[2,13]},\"children\":[]}]}]}]},\"path\":\"test/fixtures/ruby/corpus/and-or.B.rb\",\"language\":\"Ruby\"}]}\n"
jsonParseTreeOutput = "{\"trees\":[{\"tree\":{\"term\":\"Program\",\"children\":[{\"term\":\"LowAnd\",\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"foo\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]}},\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"bar\",\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]}},\"sourceRange\":[0,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,12]}}],\"sourceRange\":[0,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,1]}},\"path\":\"test/fixtures/ruby/corpus/and-or.A.rb\",\"language\":\"Ruby\"}]}\n"
jsonParseTreeOutput' = "{\"trees\":[{\"tree\":{\"term\":\"Program\",\"children\":[{\"term\":\"LowAnd\",\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"foo\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]}},\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"bar\",\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,12]}},\"sourceRange\":[0,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,12]}}],\"sourceRange\":[0,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,1]}},\"path\":\"test/fixtures/ruby/corpus/and-or.A.rb\",\"language\":\"Ruby\"},{\"tree\":{\"term\":\"Program\",\"children\":[{\"term\":\"LowOr\",\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"foo\",\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[0,3],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,4]}},\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"bar\",\"sourceRange\":[7,10],\"sourceSpan\":{\"start\":[1,8],\"end\":[1,11]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[7,10],\"sourceSpan\":{\"start\":[1,8],\"end\":[1,11]}},\"sourceRange\":[0,10],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,11]}},{\"term\":\"LowAnd\",\"children\":{\"term\":\"LowOr\",\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"a\",\"sourceRange\":[11,12],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,2]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[11,12],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,2]}},\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"b\",\"sourceRange\":[16,17],\"sourceSpan\":{\"start\":[2,6],\"end\":[2,7]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[16,17],\"sourceSpan\":{\"start\":[2,6],\"end\":[2,7]}},\"sourceRange\":[11,17],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,7]}},\"children\":{\"term\":\"Send\",\"sendReceiver\":null,\"sendSelector\":{\"term\":\"Identifier\",\"name\":\"c\",\"sourceRange\":[22,23],\"sourceSpan\":{\"start\":[2,12],\"end\":[2,13]}},\"sendArgs\":[],\"sendBlock\":null,\"sourceRange\":[22,23],\"sourceSpan\":{\"start\":[2,12],\"end\":[2,13]}},\"sourceRange\":[11,23],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,13]}}],\"sourceRange\":[0,24],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},\"path\":\"test/fixtures/ruby/corpus/and-or.B.rb\",\"language\":\"Ruby\"}]}\n"
emptyJsonParseTreeOutput = "{\"trees\":[]}\n"
symbolsOutput = "{\"files\":[{\"path\":\"test/fixtures/ruby/corpus/method-declaration.A.rb\",\"symbols\":[{\"span\":{\"start\":[1,1],\"end\":[2,4]},\"kind\":\"Method\",\"symbol\":\"foo\"}],\"language\":\"Ruby\"}]}\n"
tagsOutput = "[{\"span\":{\"start\":[1,1],\"end\":[2,4]},\"path\":\"test/fixtures/ruby/corpus/method-declaration.A.rb\",\"kind\":\"Method\",\"symbol\":\"foo\",\"line\":\"def foo\",\"language\":\"Ruby\"}]\n"
@ -56,6 +56,6 @@ diffFixtures =
]
where pathMode = [both (File "test/fixtures/ruby/corpus/method-declaration.A.rb" (Just Ruby)) (File "test/fixtures/ruby/corpus/method-declaration.B.rb" (Just Ruby))]
jsonOutput = "{\"diffs\":[{\"diff\":{\"merge\":{\"before\":{\"category\":\"Program\",\"sourceRange\":[0,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},\"after\":{\"category\":\"Program\",\"sourceRange\":[0,21],\"sourceSpan\":{\"start\":[1,1],\"end\":[4,1]}},\"children\":[{\"merge\":{\"before\":{\"category\":\"Method\",\"sourceRange\":[0,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,4]}},\"after\":{\"category\":\"Method\",\"sourceRange\":[0,20],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,4]}},\"children\":[{\"merge\":{\"before\":{\"category\":\"Empty\",\"sourceRange\":[0,0],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,1]}},\"after\":{\"category\":\"Empty\",\"sourceRange\":[0,0],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,1]}},\"children\":[]}},{\"patch\":{\"replace\":[{\"category\":\"Identifier\",\"children\":[],\"name\":\"foo\",\"sourceRange\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}},{\"category\":\"Identifier\",\"children\":[],\"name\":\"bar\",\"sourceRange\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}}]}},{\"patch\":{\"insert\":{\"category\":\"Identifier\",\"children\":[],\"name\":\"a\",\"sourceRange\":[8,9],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,10]}}}},{\"merge\":{\"before\":{\"category\":\"[]\",\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,4]}},\"after\":{\"category\":\"\",\"sourceRange\":[13,16],\"sourceSpan\":{\"start\":[2,3],\"end\":[2,6]}},\"children\":[{\"patch\":{\"insert\":{\"category\":\"Send\",\"children\":[{\"patch\":{\"insert\":{\"category\":\"Identifier\",\"children\":[],\"name\":\"baz\",\"sourceRange\":[13,16],\"sourceSpan\":{\"start\":[2,3],\"end\":[2,6]}}}}],\"sourceRange\":[13,16],\"sourceSpan\":{\"start\":[2,3],\"end\":[2,6]}}}}]}}]}}]}},\"stat\":{\"path\":\"test/fixtures/ruby/corpus/method-declaration.A.rb -> test/fixtures/ruby/corpus/method-declaration.B.rb\",\"replace\":[{\"path\":\"test/fixtures/ruby/corpus/method-declaration.A.rb\",\"language\":\"Ruby\"},{\"path\":\"test/fixtures/ruby/corpus/method-declaration.B.rb\",\"language\":\"Ruby\"}]}}]}\n"
sExpressionOutput = "(Program\n (Method\n (Empty)\n { (Identifier)\n ->(Identifier) }\n {+(Identifier)+}\n (\n {+(Send\n {+(Identifier)+})+})))\n"
jsonOutput = "{\"diffs\":[{\"diff\":{\"merge\":{\"term\":\"Program\",\"children\":[{\"merge\":{\"term\":\"Method\",\"methodContext\":[],\"methodReceiver\":{\"merge\":{\"term\":\"Empty\",\"before\":{\"sourceRange\":[0,0],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,1]}},\"after\":{\"sourceRange\":[0,0],\"sourceSpan\":{\"start\":[1,1],\"end\":[1,1]}}}},\"methodName\":{\"patch\":{\"replace\":[{\"term\":\"Identifier\",\"name\":\"foo\",\"sourceRange\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}},{\"term\":\"Identifier\",\"name\":\"bar\",\"sourceRange\":[4,7],\"sourceSpan\":{\"start\":[1,5],\"end\":[1,8]}}]}},\"methodParameters\":[{\"patch\":{\"insert\":{\"term\":\"Identifier\",\"name\":\"a\",\"sourceRange\":[8,9],\"sourceSpan\":{\"start\":[1,9],\"end\":[1,10]}}}}],\"methodBody\":{\"merge\":{\"children\":[{\"patch\":{\"insert\":{\"term\":\"Send\",\"sourceRange\":[13,16],\"sendReceiver\":null,\"sendBlock\":null,\"sendArgs\":[],\"sourceSpan\":{\"start\":[2,3],\"end\":[2,6]},\"sendSelector\":{\"patch\":{\"insert\":{\"term\":\"Identifier\",\"name\":\"baz\",\"sourceRange\":[13,16],\"sourceSpan\":{\"start\":[2,3],\"end\":[2,6]}}}}}}}],\"before\":{\"sourceRange\":[8,11],\"sourceSpan\":{\"start\":[2,1],\"end\":[2,4]}},\"after\":{\"sourceRange\":[13,16],\"sourceSpan\":{\"start\":[2,3],\"end\":[2,6]}}}},\"before\":{\"sourceRange\":[0,11],\"sourceSpan\":{\"start\":[1,1],\"end\":[2,4]}},\"after\":{\"sourceRange\":[0,20],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,4]}}}}],\"before\":{\"sourceRange\":[0,12],\"sourceSpan\":{\"start\":[1,1],\"end\":[3,1]}},\"after\":{\"sourceRange\":[0,21],\"sourceSpan\":{\"start\":[1,1],\"end\":[4,1]}}}},\"stat\":{\"path\":\"test/fixtures/ruby/corpus/method-declaration.A.rb -> test/fixtures/ruby/corpus/method-declaration.B.rb\",\"replace\":[{\"path\":\"test/fixtures/ruby/corpus/method-declaration.A.rb\",\"language\":\"Ruby\"},{\"path\":\"test/fixtures/ruby/corpus/method-declaration.B.rb\",\"language\":\"Ruby\"}]}}]}\n"
sExpressionOutput = "(Program\n (Method\n (Empty)\n { (Identifier)\n ->(Identifier) }\n {+(Identifier)+}\n (Statements\n {+(Send\n {+(Identifier)+})+})))\n"
tocOutput = "{\"changes\":{\"test/fixtures/ruby/corpus/method-declaration.A.rb -> test/fixtures/ruby/corpus/method-declaration.B.rb\":[{\"span\":{\"start\":[1,1],\"end\":[3,4]},\"category\":\"Method\",\"term\":\"bar\",\"changeType\":\"modified\"}]},\"errors\":{}}\n"

View File

@ -18,6 +18,6 @@ spec = parallel $ do
it "renders with the specified renderer" $ do
output <- fmap runBuilder . runTask $ runParse SExpressionTermRenderer [methodsBlob]
output `shouldBe` "(Program\n (Method\n (Empty)\n (Identifier)\n ([])))\n"
output `shouldBe` "(Program\n (Method\n (Empty)\n (Identifier)\n (Statements)))\n"
where
methodsBlob = Blob "def foo\nend\n" "methods.rb" (Just Ruby)

View File

@ -4,9 +4,9 @@
(Function
(Empty)
(Identifier)
([])
(
(
(Statements)
(Statements
(Statements
(Type
(Identifier)
(Array
@ -17,7 +17,7 @@
->(Integer) })
{ (Identifier)
->(Identifier) })))
(
(Statements
(Type
{ (Identifier)
->(Identifier) }
@ -28,7 +28,7 @@
{ (Integer)
->(Integer) }
(Identifier)))))
(
(Statements
(Type
{ (Identifier)
->(Identifier) }

View File

@ -4,9 +4,9 @@
(Function
(Empty)
(Identifier)
([])
(
(
(Statements)
(Statements
(Statements
(Type
(Identifier)
(Array
@ -17,7 +17,7 @@
->(Integer) })
{ (Identifier)
->(Identifier) })))
(
(Statements
(Type
{ (Identifier)
->(Identifier) }
@ -28,7 +28,7 @@
{ (Integer)
->(Integer) }
(Identifier)))))
(
(Statements
(Type
{ (Identifier)
->(Identifier) }

View File

@ -4,9 +4,9 @@
(Function
(Empty)
(Identifier)
([])
(
(
(Statements)
(Statements
(Statements
(Type
(Identifier)
(Array
@ -14,7 +14,7 @@
(Integer)
(Integer))
(Identifier))))
(
(Statements
(Type
(Identifier)
(Array
@ -22,7 +22,7 @@
(Array
(Integer)
(Identifier)))))
(
(Statements
(Type
(Identifier)
(Array

View File

@ -4,9 +4,9 @@
(Function
(Empty)
(Identifier)
([])
(
(
(Statements)
(Statements
(Statements
(Type
(Identifier)
(Array
@ -14,7 +14,7 @@
(Integer)
(Integer))
(Identifier))))
(
(Statements
(Type
(Identifier)
(Array
@ -22,7 +22,7 @@
(Array
(Integer)
(Identifier)))))
(
(Statements
(Type
(Identifier)
(Array

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Composite
(Array
(Identifier))
(
(Statements
{+(Integer)+}
{+(Integer)+}
{ (Integer)

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Composite
(Array
(Identifier))
(
(Statements
{+(Integer)+}
{ (Integer)
->(Integer) }

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Composite
(Array
(Identifier))
(
(Statements
(Integer)
(Integer)
(Integer))))))

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Composite
(Array
(Identifier))
(
(Statements
(Integer)
(Integer)
(Integer))))))

View File

@ -4,25 +4,25 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
{ (Identifier)
->(Identifier) }
(Integer))
(Assignment
(
(Statements
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
(Plus
(
(Statements
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
(
(Statements
(Integer)
(Integer))))
{+(Assignment
@ -68,13 +68,13 @@
{+(Integer)+})+})+})+}
{+(Assignment
{+(Identifier)+}
{+(
{+(Statements
{+(Pointer
{+(Identifier)+})+}
{+(Reference
{+(Composite
{+(Identifier)+}
{+(
{+(Statements
{+(KeyValue
{+(Identifier)+}
{+(Integer)+})+})+})+})+})+})+}
@ -121,13 +121,13 @@
{-(Integer)-})-})-})-}
{-(Assignment
{-(Identifier)-}
{-(
{-(Statements
{-(Pointer
{-(Identifier)-})-}
{-(Reference
{-(Composite
{-(Identifier)-}
{-(
{-(Statements
{-(KeyValue
{-(Identifier)-}
{-(Integer)-})-})-})-})-})-})-})))

View File

@ -4,25 +4,25 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
{ (Identifier)
->(Identifier) }
(Integer))
(Assignment
(
(Statements
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
(Plus
(
(Statements
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
(
(Statements
(Integer)
(Integer))))
{+(Assignment
@ -68,13 +68,13 @@
{+(Integer)+})+})+})+}
{+(Assignment
{+(Identifier)+}
{+(
{+(Statements
{+(Pointer
{+(Identifier)+})+}
{+(Reference
{+(Composite
{+(Identifier)+}
{+(
{+(Statements
{+(KeyValue
{+(Identifier)+}
{+(Integer)+})+})+})+})+})+})+}
@ -121,13 +121,13 @@
{-(Integer)-})-})-})-}
{-(Assignment
{-(Identifier)-}
{-(
{-(Statements
{-(Pointer
{-(Identifier)-})-}
{-(Reference
{-(Composite
{-(Identifier)-}
{-(
{-(Statements
{-(KeyValue
{-(Identifier)-}
{-(Integer)-})-})-})-})-})-})-})))

View File

@ -4,20 +4,20 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
(Integer))
(Assignment
(
(Statements
(Identifier)
(Identifier))
(Plus
(
(Statements
(Identifier)
(Identifier))
(
(Statements
(Integer)
(Integer))))
(Assignment
@ -63,13 +63,13 @@
(Integer))))
(Assignment
(Identifier)
(
(Statements
(Pointer
(Identifier))
(Reference
(Composite
(Identifier)
(
(Statements
(KeyValue
(Identifier)
(Integer))))))))))

View File

@ -4,20 +4,20 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
(Integer))
(Assignment
(
(Statements
(Identifier)
(Identifier))
(Plus
(
(Statements
(Identifier)
(Identifier))
(
(Statements
(Integer)
(Integer))))
(Assignment
@ -63,13 +63,13 @@
(Integer))))
(Assignment
(Identifier)
(
(Statements
(Pointer
(Identifier))
(Reference
(Composite
(Identifier)
(
(Statements
(KeyValue
(Identifier)
(Integer))))))))))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Context
(Comment)
(Or

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Context
(Comment)
(Or

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Context
(Comment)
(Or

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Context
(Comment)
(Or

View File

@ -4,12 +4,12 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Call
{ (Identifier)
->(Identifier) }
(
(Statements
(Identifier)
(Variadic
(Identifier)))
@ -17,25 +17,25 @@
(Call
{ (Identifier)
->(Identifier) }
(
(Statements
(Identifier)
(Identifier))
(Empty))
{+(Call
{+(Identifier)+}
{+(
{+(Statements
{+(Identifier)+}
{+(Variadic
{+(Identifier)+})+})+}
{+(Empty)+})+}
{-(Call
{-(Identifier)-}
{-(
{-(Statements
{-(Identifier)-}
{-(Variadic
{-(Identifier)-})-})-}
{-(Empty)-})-}
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-})))

View File

@ -4,12 +4,12 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Call
{ (Identifier)
->(Identifier) }
(
(Statements
(Identifier)
(Variadic
(Identifier)))
@ -17,13 +17,13 @@
(Call
{ (Identifier)
->(Identifier) }
(
(Statements
(Identifier)
(Identifier))
(Empty))
{+(Call
{+(Identifier)+}
{+(
{+(Statements
{+(Identifier)+}
{+(Variadic
{+(Identifier)+})+})+}
@ -31,8 +31,8 @@
(Call
{ (Identifier)
->(Identifier) }
{+([])+}
{-(
{+(Statements)+}
{-(Statements
{-(Identifier)-}
{-(Variadic
{-(Identifier)-})-})-}

View File

@ -4,29 +4,29 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Call
(Identifier)
(
(Statements
(Identifier)
(Variadic
(Identifier)))
(Empty))
(Call
(Identifier)
(
(Statements
(Identifier)
(Identifier))
(Empty))
(Call
(Identifier)
(
(Statements
(Identifier)
(Variadic
(Identifier)))
(Empty))
(Call
(Identifier)
([])
(Statements)
(Empty)))))

View File

@ -4,24 +4,24 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Call
(Identifier)
(
(Statements
(Identifier)
(Variadic
(Identifier)))
(Empty))
(Call
(Identifier)
(
(Statements
(Identifier)
(Identifier))
(Empty))
(Call
(Identifier)
(
(Statements
(Identifier)
(Variadic
(Identifier)))

View File

@ -4,44 +4,44 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
{ (Match
{-(Empty)-}
{-([])-})
->(
{-(Statements)-})
->(Statements
{+(Match
{+([])+}
{+(Statements)+}
{+(Pattern
{+(Identifier)+}
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+})+})+}
{+(Match
{+(
{+(Statements
{+(Identifier)+})+}
{+(
{+(Statements
{+(Pattern
{+(
{+(Statements
{+(Integer)+}
{+(Integer)+})+}
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Pattern
{+(Identifier)+}
{+(Empty)+})+})+})+}
{+(DefaultPattern
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Break
{+(Empty)+})+})+})+})+})+}) }))

View File

@ -4,44 +4,44 @@
(Function
(Empty)
(Identifier)
([])
{ (
(Statements)
{ (Statements
{-(Match
{-([])-}
{-(Statements)-}
{-(Pattern
{-(Identifier)-}
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-})-})-}
{-(Match
{-(
{-(Statements
{-(Identifier)-})-}
{-(
{-(Statements
{-(Pattern
{-(
{-(Statements
{-(Integer)-}
{-(Integer)-})-}
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Pattern
{-(Identifier)-}
{-(Empty)-})-})-})-}
{-(DefaultPattern
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Break
{-(Empty)-})-})-})-})-})-})
->(Match
{+(Empty)+}
{+([])+}) }))
{+(Statements)+}) }))

View File

@ -4,7 +4,7 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Match
(Empty)
([]))))
(Statements))))

View File

@ -4,41 +4,41 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Match
([])
(Statements)
(Pattern
(Identifier)
(Call
(Identifier)
([])
(Statements)
(Empty))))
(Match
(
(Statements
(Identifier))
(
(Statements
(Pattern
(
(Statements
(Integer)
(Integer))
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Pattern
(Identifier)
(Empty))))
(DefaultPattern
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Break
(Empty)))))))))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
{+(Type
{+(Identifier)+}
{+(BidirectionalChannel
@ -17,7 +17,7 @@
{+(SendChannel
{+(Constructor
{+(Empty)+}
{+([])+})+})+})+})+}
{+(Statements)+})+})+})+})+}
(Type
{ (Identifier)
->(Identifier) }
@ -44,7 +44,7 @@
{-(SendChannel
{-(Constructor
{-(Empty)-}
{-([])-})-})-})-})-}
{-(Statements)-})-})-})-})-}
{-(Type
{-(Identifier)-}
{-(SendChannel

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
{+(Type
{+(Identifier)+}
{+(BidirectionalChannel
@ -17,7 +17,7 @@
{+(SendChannel
{+(Constructor
{+(Empty)+}
{+([])+})+})+})+})+}
{+(Statements)+})+})+})+})+}
{+(Type
{+(Identifier)+}
{+(SendChannel
@ -45,7 +45,7 @@
{-(SendChannel
{-(Constructor
{-(Empty)-}
{-([])-})-})-})-})-}
{-(Statements)-})-})-})-})-}
{-(Type
{-(Identifier)-}
{-(SendChannel

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Type
(Identifier)
(BidirectionalChannel
@ -17,7 +17,7 @@
(SendChannel
(Constructor
(Empty)
([])))))
(Statements)))))
(Type
(Identifier)
(SendChannel

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Type
(Identifier)
(BidirectionalChannel
@ -17,7 +17,7 @@
(SendChannel
(Constructor
(Empty)
([])))))
(Statements)))))
(Type
(Identifier)
(SendChannel

View File

@ -4,7 +4,7 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Context
{ (Comment)
->(Comment) }

View File

@ -4,7 +4,7 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Context
{ (Comment)
->(Comment) }

View File

@ -4,7 +4,7 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Context
(Comment)
(Empty))))

View File

@ -4,7 +4,7 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Context
(Comment)
(Empty))))

View File

@ -4,16 +4,16 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Annotation
(
(Statements
{ (Identifier)
->(Identifier) }
{+(Identifier)+})
{ (Identifier)
->(Identifier) })
{ (Integer)
->(
->(Statements
{+(Integer)+}
{+(Integer)+}) })))

View File

@ -4,16 +4,16 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Annotation
(
(Statements
{ (Identifier)
->(Identifier) }
{-(Identifier)-})
{ (Identifier)
->(Identifier) })
{ (
{ (Statements
{-(Integer)-}
{-(Integer)-})
->(Integer) })))

View File

@ -4,10 +4,10 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Annotation
(
(Statements
(Identifier))
(Identifier))
(Integer))))

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Annotation
(
(Statements
(Identifier)
(Identifier))
(Identifier))
(
(Statements
(Integer)
(Integer)))))

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
{ (Identifier)
->(
->(Statements
{+(Identifier)+}
{+(Identifier)+}) }
{ (Integer)
->(
->(Statements
{+(Integer)+}
{+(Integer)+}) })))

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
{ (
{ (Statements
{-(Identifier)-}
{-(Identifier)-})
->(Identifier) }
{ (
{ (Statements
{-(Integer)-}
{-(Integer)-})
->(Integer) })))

View File

@ -4,7 +4,7 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Integer))))

View File

@ -4,11 +4,11 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(
(Statements
(Identifier)
(Identifier))
(
(Statements
(Integer)
(Integer)))))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
{+(Assignment
{+(Identifier)+}
{+(Identifier)+})+}
@ -13,13 +13,13 @@
{ (Identifier)
->(Identifier) }
{ (Identifier)
->([]) })
->(Statements) })
{+(Assignment
{+(Identifier)+}
{+([])+})+}
{+(Statements)+})+}
{-(Assignment
{-(Identifier)-}
{-([])-})-}
{-(Statements)-})-}
{-(Assignment
{-(Identifier)-}
{-([])-})-})))
{-(Statements)-})-})))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
{+(Assignment
{+(Identifier)+}
{+(Identifier)+})+}
@ -13,13 +13,13 @@
{ (Identifier)
->(Identifier) }
{ (Identifier)
->([]) })
->(Statements) })
{+(Assignment
{+(Identifier)+}
{+([])+})+}
{+(Statements)+})+}
{-(Assignment
{-(Identifier)-}
{-([])-})-}
{-(Statements)-})-}
{-(Assignment
{-(Identifier)-}
{-([])-})-})))
{-(Statements)-})-})))

View File

@ -4,14 +4,14 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
(Identifier))
(Assignment
(Identifier)
([]))
(Statements))
(Assignment
(Identifier)
([])))))
(Statements)))))

View File

@ -4,14 +4,14 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
(Identifier))
(Assignment
(Identifier)
([]))
(Statements))
(Assignment
(Identifier)
([])))))
(Statements)))))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Call
(Identifier)
(SendChannel
@ -14,7 +14,7 @@
(Empty))
(Call
(Identifier)
(
(Statements
(SendChannel
{ (Identifier)
->(Identifier) })
@ -24,7 +24,7 @@
(Empty))
(Call
(Identifier)
(
(Statements
(SendChannel
{ (Identifier)
->(Identifier) })

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Call
(Identifier)
(SendChannel
@ -14,7 +14,7 @@
(Empty))
(Call
(Identifier)
(
(Statements
(SendChannel
{ (Identifier)
->(Identifier) })
@ -24,7 +24,7 @@
(Empty))
(Call
(Identifier)
(
(Statements
(SendChannel
{ (Identifier)
->(Identifier) })

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Call
(Identifier)
(SendChannel
@ -13,7 +13,7 @@
(Empty))
(Call
(Identifier)
(
(Statements
(SendChannel
(Identifier))
(Minus
@ -22,7 +22,7 @@
(Empty))
(Call
(Identifier)
(
(Statements
(SendChannel
(Identifier))
(Integer)

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Call
(Identifier)
(SendChannel
@ -13,7 +13,7 @@
(Empty))
(Call
(Identifier)
(
(Statements
(SendChannel
(Identifier))
(Minus
@ -22,7 +22,7 @@
(Empty))
(Call
(Identifier)
(
(Statements
(SendChannel
(Identifier))
(Integer)

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
{ (Float)

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
{ (Float)

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
(Float))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
(Float))

View File

@ -4,26 +4,26 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(For
(Empty)
(Empty)
(Empty)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Goto
(Identifier))))
{+(ForEach
{+(Identifier)+}
{+(Identifier)+}
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Break
{+(Identifier)+})+})+})+}
@ -31,10 +31,10 @@
{+(Empty)+}
{+(Empty)+}
{+(Empty)+}
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Continue
{+(Identifier)+})+})+})+}
@ -53,10 +53,10 @@
{ (PostIncrement
{-(Identifier)-})
->(Empty) }
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
{+(Continue
{+(Empty)+})+}
@ -66,7 +66,7 @@
{+(Empty)+}
{+(Empty)+}
{+(Empty)+}
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+(Identifier)+}
@ -74,24 +74,24 @@
{+(Break
{+(Empty)+})+})+})+}
{+(ForEach
{+(
{+(Statements
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Call
{+(Identifier)+}
{+(
{+(Statements
{+(Identifier)+}
{+(Identifier)+})+}
{+(Empty)+})+})+}
{+(ForEach
{+(
{+(Statements
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Call
{+(Identifier)+}
{+(
{+(Statements
{+(Identifier)+}
{+(Identifier)+})+}
{+(Empty)+})+})+}
@ -103,12 +103,12 @@
{+(Empty)+}
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+})+}
{+(ForEach
{+(Empty)+}
{+(Identifier)+}
{+([])+})+}
{+(Statements)+})+}
{-(For
{-(LessThan
{-(Identifier)-}
@ -116,10 +116,10 @@
{-(PostIncrement
{-(Identifier)-})-}
{-(Empty)-}
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Continue
{-(Identifier)-})-})-})-}
@ -127,17 +127,17 @@
{-(Empty)-}
{-(Empty)-}
{-(Empty)-}
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Continue
{-(Empty)-})-})-})-}
{-(ForEach
{-(Identifier)-}
{-(Identifier)-}
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-(Identifier)-}
@ -145,24 +145,24 @@
{-(Break
{-(Empty)-})-})-})-}
{-(ForEach
{-(
{-(Statements
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Call
{-(Identifier)-}
{-(
{-(Statements
{-(Identifier)-}
{-(Identifier)-})-}
{-(Empty)-})-})-}
{-(ForEach
{-(
{-(Statements
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Call
{-(Identifier)-}
{-(
{-(Statements
{-(Identifier)-}
{-(Identifier)-})-}
{-(Empty)-})-})-}
@ -174,9 +174,9 @@
{-(Empty)-}
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-})-}
{-(ForEach
{-(Empty)-}
{-(Identifier)-}
{-([])-})-})))
{-(Statements)-})-})))

View File

@ -4,16 +4,16 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(For
(Empty)
(Empty)
(Empty)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Goto
(Identifier))))
@ -26,10 +26,10 @@
{+(Integer)+})+}
{+(PostIncrement
{+(Identifier)+})+}
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Break
{+(Identifier)+})+})+})+}
@ -40,10 +40,10 @@
{+(PostIncrement
{+(Identifier)+})+}
{+(Empty)+}
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Continue
{+(Identifier)+})+})+})+}
@ -51,44 +51,44 @@
{+(Empty)+}
{+(Empty)+}
{+(Empty)+}
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Continue
{+(Empty)+})+})+})+}
(ForEach
(Identifier)
(Identifier)
(
(Statements
(Call
(Identifier)
{+(Identifier)+}
{-([])-}
{-(Statements)-}
(Empty))
(Break
{ (Identifier)
->(Empty) })))
{+(ForEach
{+(
{+(Statements
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Call
{+(Identifier)+}
{+(
{+(Statements
{+(Identifier)+}
{+(Identifier)+})+}
{+(Empty)+})+})+}
{+(ForEach
{+(
{+(Statements
{+(Identifier)+}
{+(Identifier)+})+}
{+(Identifier)+}
{+(Call
{+(Identifier)+}
{+(
{+(Statements
{+(Identifier)+}
{+(Identifier)+})+}
{+(Empty)+})+})+}
@ -100,20 +100,20 @@
{+(Empty)+}
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+})+}
{+(ForEach
{+(Empty)+}
{+(Identifier)+}
{+([])+})+}
{+(Statements)+})+}
{-(For
{-(Empty)-}
{-(Empty)-}
{-(Empty)-}
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Continue
{-(Identifier)-})-})-})-}
@ -124,10 +124,10 @@
{-(PostIncrement
{-(Identifier)-})-}
{-(Empty)-}
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Continue
{-(Empty)-})-})-})-}
@ -135,7 +135,7 @@
{-(Empty)-}
{-(Empty)-}
{-(Empty)-}
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-(Identifier)-}
@ -143,24 +143,24 @@
{-(Break
{-(Empty)-})-})-})-}
{-(ForEach
{-(
{-(Statements
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Call
{-(Identifier)-}
{-(
{-(Statements
{-(Identifier)-}
{-(Identifier)-})-}
{-(Empty)-})-})-}
{-(ForEach
{-(
{-(Statements
{-(Identifier)-}
{-(Identifier)-})-}
{-(Identifier)-}
{-(Call
{-(Identifier)-}
{-(
{-(Statements
{-(Identifier)-}
{-(Identifier)-})-}
{-(Empty)-})-})-}
@ -172,9 +172,9 @@
{-(Empty)-}
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-})-}
{-(ForEach
{-(Empty)-}
{-(Identifier)-}
{-([])-})-})))
{-(Statements)-})-})))

View File

@ -4,16 +4,16 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(For
(Empty)
(Empty)
(Empty)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Goto
(Identifier))))
@ -26,10 +26,10 @@
(Integer))
(PostIncrement
(Identifier))
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Break
(Identifier))))
@ -40,10 +40,10 @@
(PostIncrement
(Identifier))
(Empty)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Continue
(Identifier))))
@ -51,17 +51,17 @@
(Empty)
(Empty)
(Empty)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Continue
(Empty))))
(ForEach
(Identifier)
(Identifier)
(
(Statements
(Call
(Identifier)
(Identifier)
@ -69,24 +69,24 @@
(Break
(Empty))))
(ForEach
(
(Statements
(Identifier)
(Identifier))
(Identifier)
(Call
(Identifier)
(
(Statements
(Identifier)
(Identifier))
(Empty)))
(ForEach
(
(Statements
(Identifier)
(Identifier))
(Identifier)
(Call
(Identifier)
(
(Statements
(Identifier)
(Identifier))
(Empty)))
@ -98,9 +98,9 @@
(Empty)
(Call
(Identifier)
([])
(Statements)
(Empty)))
(ForEach
(Empty)
(Identifier)
([])))))
(Statements)))))

View File

@ -4,26 +4,26 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(For
(Empty)
(Empty)
(Empty)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Goto
(Identifier))))
(ForEach
(Identifier)
(Identifier)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Break
(Identifier))))
@ -31,10 +31,10 @@
(Empty)
(Empty)
(Empty)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Continue
(Identifier))))
@ -45,10 +45,10 @@
(PostIncrement
(Identifier))
(Empty)
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty))
(Continue
(Empty))))
@ -56,7 +56,7 @@
(Empty)
(Empty)
(Empty)
(
(Statements
(Call
(Identifier)
(Identifier)
@ -64,24 +64,24 @@
(Break
(Empty))))
(ForEach
(
(Statements
(Identifier)
(Identifier))
(Identifier)
(Call
(Identifier)
(
(Statements
(Identifier)
(Identifier))
(Empty)))
(ForEach
(
(Statements
(Identifier)
(Identifier))
(Identifier)
(Call
(Identifier)
(
(Statements
(Identifier)
(Identifier))
(Empty)))
@ -93,9 +93,9 @@
(Empty)
(Call
(Identifier)
([])
(Statements)
(Empty)))
(ForEach
(Empty)
(Identifier)
([])))))
(Statements)))))

View File

@ -4,57 +4,57 @@
(Function
(Empty)
(Identifier)
([])
([]))
(Statements)
(Statements))
(Function
(Empty)
{ (Identifier)
->(Identifier) }
([])
([]))
(Statements)
(Statements))
(Function
(Identifier)
{ (Identifier)
->(Identifier) }
(
(
(Statements
(Statements
(Identifier)
(Identifier))
(
(Statements
(Identifier)
(Identifier)
(Identifier)
(Identifier)))
([]))
(Statements))
(Function
(Empty)
{ (Identifier)
->(Identifier) }
([])
(
(
(Statements)
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
([]))
(Statements))
(Function
(Empty)
{ (Identifier)
->(Identifier) }
([])
(
(
(Statements)
(Statements
(Statements
(Identifier)
(Identifier))
(
(Statements
(Identifier)
(Identifier)))
([]))
(Statements))
{+(Function
{+(Empty)+}
{+(Identifier)+}
{+([])+}
{+([])+}
{+(Statements)+}
{+(Statements)+}
{+(NoOp
{+(Empty)+})+})+}
(Function
@ -62,17 +62,17 @@
->(Identifier) }
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty))
(Function
(Empty)
{ (Identifier)
->(Identifier) }
(
(Statements
(Identifier)
(Pointer
(Identifier)))
(Context
(Comment)
(Empty))
([])))
(Statements)))

View File

@ -4,88 +4,88 @@
(Function
(Empty)
(Identifier)
([])
([]))
(Statements)
(Statements))
(Function
(Empty)
{ (Identifier)
->(Identifier) }
([])
([]))
(Statements)
(Statements))
(Function
(Identifier)
{ (Identifier)
->(Identifier) }
(
(
(Statements
(Statements
(Identifier)
(Identifier))
(
(Statements
(Identifier)
(Identifier)
(Identifier)
(Identifier)))
([]))
(Statements))
(Function
(Empty)
{ (Identifier)
->(Identifier) }
([])
(
(
(Statements)
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
([]))
(Statements))
(Function
(Empty)
{ (Identifier)
->(Identifier) }
([])
(
(
(Statements)
(Statements
(Statements
(Identifier)
(Identifier))
(
(Statements
(Identifier)
(Identifier)))
([]))
(Statements))
{+(Function
{+(Identifier)+}
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Function
{+(Empty)+}
{+(Identifier)+}
{+(
{+(Statements
{+(Identifier)+}
{+(Pointer
{+(Identifier)+})+})+}
{+(Context
{+(Comment)+}
{+(Empty)+})+}
{+([])+})+}
{+(Statements)+})+}
{-(Function
{-(Empty)-}
{-(Identifier)-}
{-([])-}
{-([])-}
{-(Statements)-}
{-(Statements)-}
{-(NoOp
{-(Empty)-})-})-}
{-(Function
{-(Identifier)-}
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Function
{-(Empty)-}
{-(Identifier)-}
{-(
{-(Statements
{-(Identifier)-}
{-(Pointer
{-(Identifier)-})-})-}
{-(Context
{-(Comment)-}
{-(Empty)-})-}
{-([])-})-})
{-(Statements)-})-})

View File

@ -4,61 +4,61 @@
(Function
(Empty)
(Identifier)
([])
([]))
(Statements)
(Statements))
(Function
(Empty)
(Identifier)
([])
([]))
(Statements)
(Statements))
(Function
(Identifier)
(Identifier)
(
(
(Statements
(Statements
(Identifier)
(Identifier))
(
(Statements
(Identifier)
(Identifier)
(Identifier)
(Identifier)))
([]))
(Statements))
(Function
(Empty)
(Identifier)
([])
(
(
(Statements)
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
([]))
(Statements))
(Function
(Empty)
(Identifier)
([])
(
(
(Statements)
(Statements
(Statements
(Identifier)
(Identifier))
(
(Statements
(Identifier)
(Identifier)))
([]))
(Statements))
(Function
(Identifier)
(Identifier)
([])
(Statements)
(Empty))
(Function
(Empty)
(Identifier)
(
(Statements
(Identifier)
(Pointer
(Identifier)))
(Context
(Comment)
(Empty))
([])))
(Statements)))

View File

@ -4,68 +4,68 @@
(Function
(Empty)
(Identifier)
([])
([]))
(Statements)
(Statements))
(Function
(Empty)
(Identifier)
([])
([]))
(Statements)
(Statements))
(Function
(Identifier)
(Identifier)
(
(
(Statements
(Statements
(Identifier)
(Identifier))
(
(Statements
(Identifier)
(Identifier)
(Identifier)
(Identifier)))
([]))
(Statements))
(Function
(Empty)
(Identifier)
([])
(
(
(Statements)
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
([]))
(Statements))
(Function
(Empty)
(Identifier)
([])
(
(
(Statements)
(Statements
(Statements
(Identifier)
(Identifier))
(
(Statements
(Identifier)
(Identifier)))
([]))
(Statements))
(Function
(Empty)
(Identifier)
([])
([])
(Statements)
(Statements)
(NoOp
(Empty)))
(Function
(Identifier)
(Identifier)
([])
(Statements)
(Empty))
(Function
(Empty)
(Identifier)
(
(Statements
(Identifier)
(Pointer
(Identifier)))
(Context
(Comment)
(Empty))
([])))
(Statements)))

View File

@ -4,25 +4,25 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Function
(Empty)
(Empty)
(
(Statements
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
(
(
(Statements
(Statements
{ (Identifier)
->(Identifier) })
(
(Statements
{ (Identifier)
->(Identifier) }))
(Return
(
(Statements
(Integer)
(Integer)))))))

View File

@ -4,25 +4,25 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Function
(Empty)
(Empty)
(
(Statements
{ (Identifier)
->(Identifier) }
{ (Identifier)
->(Identifier) })
(
(
(Statements
(Statements
{ (Identifier)
->(Identifier) })
(
(Statements
{ (Identifier)
->(Identifier) }))
(Return
(
(Statements
(Integer)
(Integer)))))))

View File

@ -4,21 +4,21 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Function
(Empty)
(Empty)
(
(Statements
(Identifier)
(Identifier))
(
(
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
(Return
(
(Statements
(Integer)
(Integer)))))))

View File

@ -4,21 +4,21 @@
(Function
(Empty)
(Identifier)
([])
(Statements)
(Assignment
(Identifier)
(Function
(Empty)
(Empty)
(
(Statements
(Identifier)
(Identifier))
(
(
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
(Return
(
(Statements
(Integer)
(Integer)))))))

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Type
{ (Identifier)
->(Identifier) }
(Function
(
(Statements
{ (Identifier)
->(Identifier) })
{ (Identifier)
@ -19,18 +19,18 @@
{ (Identifier)
->(Identifier) }
(Function
(
{-(
(Statements
{-(Statements
{-(Identifier)-})-}
(
(Statements
(Identifier))
{+(
{+(Statements
{+(Identifier)+})+})
(
(
(Statements
(Statements
{+(BidirectionalChannel
{+(Identifier)+})+}
{-(Identifier)-})
(
(Statements
(Identifier)))
(Empty))))))

View File

@ -4,13 +4,13 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Type
{ (Identifier)
->(Identifier) }
(Function
(
(Statements
{ (Identifier)
->(Identifier) })
{ (Identifier)
@ -19,18 +19,18 @@
{ (Identifier)
->(Identifier) }
(Function
(
{-(
(Statements
{-(Statements
{-(Identifier)-})-}
(
(Statements
(Identifier))
{+(
{+(Statements
{+(Identifier)+})+})
(
(
(Statements
(Statements
{+(Identifier)+}
{-(BidirectionalChannel
{-(Identifier)-})-})
(
(Statements
(Identifier)))
(Empty))))))

View File

@ -4,25 +4,25 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Type
(Identifier)
(Function
(
(Statements
(Identifier))
(Identifier)))
(Type
(Identifier)
(Function
(
(
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
(
(
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
(Empty))))))

View File

@ -4,26 +4,26 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Type
(Identifier)
(Function
(
(Statements
(Identifier))
(Identifier)))
(Type
(Identifier)
(Function
(
(
(Statements
(Statements
(Identifier))
(
(Statements
(Identifier)))
(
(
(Statements
(Statements
(BidirectionalChannel
(Identifier)))
(
(Statements
(Identifier)))
(Empty))))))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Defer
(Call
(MemberAccess
@ -13,7 +13,7 @@
->(Identifier) }
{ (Identifier)
->(Identifier) })
([])
(Statements)
(Empty)))
(Go
(Call
@ -22,5 +22,5 @@
->(Identifier) }
{ (Identifier)
->(Identifier) })
([])
(Statements)
(Empty))))))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Defer
(Call
(MemberAccess
@ -13,7 +13,7 @@
->(Identifier) }
{ (Identifier)
->(Identifier) })
([])
(Statements)
(Empty)))
(Go
(Call
@ -22,5 +22,5 @@
->(Identifier) }
{ (Identifier)
->(Identifier) })
([])
(Statements)
(Empty))))))

View File

@ -4,19 +4,19 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Defer
(Call
(MemberAccess
(Identifier)
(Identifier))
([])
(Statements)
(Empty)))
(Go
(Call
(MemberAccess
(Identifier)
(Identifier))
([])
(Statements)
(Empty))))))

View File

@ -4,19 +4,19 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Defer
(Call
(MemberAccess
(Identifier)
(Identifier))
([])
(Statements)
(Empty)))
(Go
(Call
(MemberAccess
(Identifier)
(Identifier))
([])
(Statements)
(Empty))))))

View File

@ -1,7 +1,7 @@
(Program
(Package
(Identifier))
(
(Statements
{+(QualifiedImport
{+(Identifier)+})+}
{+(Import
@ -17,5 +17,5 @@
(Function
(Empty)
(Identifier)
([])
([])))
(Statements)
(Statements)))

View File

@ -1,7 +1,7 @@
(Program
(Package
(Identifier))
(
(Statements
{+(QualifiedImport
{+(Identifier)+})+}
{+(Import
@ -17,5 +17,5 @@
(Function
(Empty)
(Identifier)
([])
([])))
(Statements)
(Statements)))

View File

@ -1,7 +1,7 @@
(Program
(Package
(Identifier))
(
(Statements
(QualifiedImport
(Identifier))
(Import
@ -11,5 +11,5 @@
(Function
(Empty)
(Identifier)
([])
([])))
(Statements)
(Statements)))

View File

@ -1,7 +1,7 @@
(Program
(Package
(Identifier))
(
(Statements
(QualifiedImport
(Identifier))
(Import
@ -11,5 +11,5 @@
(Function
(Empty)
(Identifier)
([])
([])))
(Statements)
(Statements)))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
{ (Identifier)
->(Identifier) }

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
{ (Identifier)
->(Identifier) }

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
(Integer))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
(Integer))

View File

@ -4,52 +4,52 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(If
(
(Statements
(Call
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))
(If
(
(Statements
(Assignment
{ (Identifier)
->(Identifier) }
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Identifier))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))
(If
(
(Statements
(Call
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Call
(Identifier)
([])
(Statements)
(Empty)))
(If
(
(Statements
(Assignment
(Identifier)
{ (Integer)
@ -60,12 +60,12 @@
(Call
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty))
{+(Context
{+(Comment)+}
(If
(
(Statements
(LessThan
(Identifier)
{ (Integer)
@ -73,22 +73,22 @@
(Call
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty))
{ (Context
{-(Comment)-}
{-(If
{-(
{-(Statements
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-})-}
{-(Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})-}
{-(Empty)-})-})
->(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+}) }))+}))))

View File

@ -4,52 +4,52 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(If
(
(Statements
(Call
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))
(If
(
(Statements
(Assignment
{ (Identifier)
->(Identifier) }
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Identifier))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))
(If
(
(Statements
(Call
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Call
(Identifier)
([])
(Statements)
(Empty)))
(If
(
(Statements
(Assignment
(Identifier)
{ (Integer)
@ -60,12 +60,12 @@
(Call
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty))
{-(Context
{-(Comment)-}
(If
(
(Statements
(LessThan
(Identifier)
{ (Integer)
@ -73,22 +73,22 @@
(Call
{ (Identifier)
->(Identifier) }
([])
(Statements)
(Empty))
{ (Call
{-(Identifier)-}
{-([])-}
{-(Statements)-}
{-(Empty)-})
->(Context
{+(Comment)+}
{+(If
{+(
{+(Statements
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+})+}
{+(Call
{+(Identifier)+}
{+([])+}
{+(Statements)+}
{+(Empty)+})+}
{+(Empty)+})+}) }))-}))))

View File

@ -4,49 +4,49 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(If
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))
(If
(
(Statements
(Assignment
(Identifier)
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Identifier))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))
(If
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Call
(Identifier)
([])
(Statements)
(Empty)))
(If
(
(Statements
(Assignment
(Identifier)
(Integer))
@ -55,27 +55,27 @@
(Integer)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(If
(
(Statements
(LessThan
(Identifier)
(Integer)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Context
(Comment)
(If
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))))))))

View File

@ -4,49 +4,49 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(If
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))
(If
(
(Statements
(Assignment
(Identifier)
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Identifier))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Empty))
(If
(
(Statements
(Call
(Identifier)
([])
(Statements)
(Empty)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Call
(Identifier)
([])
(Statements)
(Empty)))
(If
(
(Statements
(Assignment
(Identifier)
(Integer))
@ -55,20 +55,20 @@
(Integer)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Context
(Comment)
(If
(
(Statements
(LessThan
(Identifier)
(Integer)))
(Call
(Identifier)
([])
(Statements)
(Empty))
(Call
(Identifier)
([])
(Statements)
(Empty))))))))

View File

@ -4,8 +4,8 @@
(Function
(Empty)
(Identifier)
([])
(
(Statements)
(Statements
(Assignment
(Identifier)
{ (Complex)

Some files were not shown because too many files have changed in this diff Show More