1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 22:31:36 +03:00

Merge remote-tracking branch 'origin/master' into graph-cli

This commit is contained in:
Timothy Clem 2018-04-10 13:04:34 -07:00
commit 2beb02387a
51 changed files with 249 additions and 281 deletions

2
.gitignore vendored
View File

@ -17,6 +17,8 @@ bin/
*.prof *.prof
*.pyc *.pyc
test.rb
.bundle/ .bundle/
.licenses/vendor/gems .licenses/vendor/gems
.licenses/log/ .licenses/log/

View File

@ -27,10 +27,10 @@ import qualified Language.Markdown.Syntax as Markdown
data Declaration data Declaration
= MethodDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language, declarationReceiver :: Maybe T.Text } = MethodDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language, declarationReceiver :: Maybe T.Text }
| ClassDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language } | ClassDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language }
| ImportDeclaration { declarationIdentifier :: T.Text, declarationAlias :: T.Text, declarationSymbols :: [(T.Text, T.Text)], declarationLanguage :: Maybe Language } | ImportDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language, declarationAlias :: T.Text, declarationSymbols :: [(T.Text, T.Text)] }
| FunctionDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language } | FunctionDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language }
| HeadingDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language, declarationLevel :: Int } | HeadingDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language, declarationLevel :: Int }
| CallReference { declarationIdentifier :: T.Text, declarationImportIdentifier :: [T.Text] } | CallReference { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language, declarationImportIdentifier :: [T.Text] }
| ErrorDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language } | ErrorDeclaration { declarationIdentifier :: T.Text, declarationText :: T.Text, declarationLanguage :: Maybe Language }
deriving (Eq, Generic, Show) deriving (Eq, Generic, Show)
@ -128,9 +128,9 @@ getSource blobSource = toText . flip Source.slice blobSource . getField
instance (Syntax.Identifier :< fs, Expression.MemberAccess :< fs) => CustomHasDeclaration (Union fs) Expression.Call where instance (Syntax.Identifier :< fs, Expression.MemberAccess :< fs) => CustomHasDeclaration (Union fs) Expression.Call where
customToDeclaration Blob{..} _ (Expression.Call _ (Term (In fromAnn fromF), _) _ _) customToDeclaration Blob{..} _ (Expression.Call _ (Term (In fromAnn fromF), _) _ _)
| Just (Expression.MemberAccess (Term (In leftAnn leftF)) (Term (In idenAnn _))) <- prj fromF = Just $ CallReference (getSource idenAnn) (memberAccess leftAnn leftF) | Just (Expression.MemberAccess (Term (In leftAnn leftF)) (Term (In idenAnn _))) <- prj fromF = Just $ CallReference (getSource idenAnn) mempty blobLanguage (memberAccess leftAnn leftF)
| Just (Syntax.Identifier (Name name)) <- prj fromF = Just $ CallReference (T.decodeUtf8 name) [] | Just (Syntax.Identifier (Name name)) <- prj fromF = Just $ CallReference (T.decodeUtf8 name) mempty blobLanguage []
| otherwise = Just $ CallReference (getSource fromAnn) [] | otherwise = Just $ CallReference (getSource fromAnn) mempty blobLanguage []
where where
memberAccess modAnn termFOut memberAccess modAnn termFOut
| Just (Expression.MemberAccess (Term (In leftAnn leftF)) (Term (In rightAnn rightF))) <- prj termFOut | Just (Expression.MemberAccess (Term (In leftAnn leftF)) (Term (In rightAnn rightF))) <- prj termFOut

View File

@ -74,6 +74,7 @@ type Syntax = '[
, Syntax.Identifier , Syntax.Identifier
, Syntax.Paren , Syntax.Paren
, Syntax.Program , Syntax.Program
, Ruby.Syntax.Send
, Ruby.Syntax.Class , Ruby.Syntax.Class
, Ruby.Syntax.Load , Ruby.Syntax.Load
, Ruby.Syntax.LowPrecedenceBoolean , Ruby.Syntax.LowPrecedenceBoolean
@ -83,7 +84,8 @@ type Syntax = '[
] ]
type Term = Term.Term (Union Syntax) (Record Location) type Term = Term.Term (Union Syntax) (Record Location)
type Assignment = HasCallStack => Assignment.Assignment [] Grammar Term type Assignment' a = HasCallStack => Assignment.Assignment [] Grammar a
type Assignment = Assignment' Term
-- | Assignment from AST in Rubys grammar onto a program in Rubys syntax. -- | Assignment from AST in Rubys grammar onto a program in Rubys syntax.
assignment :: Assignment assignment :: Assignment
@ -290,11 +292,21 @@ subscript = makeTerm <$> symbol ElementReference <*> children (Expression.Subscr
pair :: Assignment pair :: Assignment
pair = makeTerm <$> symbol Pair <*> children (Literal.KeyValue <$> expression <*> (expression <|> emptyTerm)) pair = makeTerm <$> symbol Pair <*> children (Literal.KeyValue <$> expression <*> (expression <|> emptyTerm))
args :: Assignment' [Term]
args = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children (many expression) <|> many expression
methodCall :: Assignment methodCall :: Assignment
methodCall = makeTerm' <$> symbol MethodCall <*> children (require <|> load <|> regularCall) methodCall = makeTerm' <$> symbol MethodCall <*> children (require <|> load <|> send)
where where
regularCall = inj <$> (Expression.Call <$> pure [] <*> expression <*> args <*> (block <|> emptyTerm)) send = inj <$> ((regularCall <|> funcCall <|> scopeCall <|> dotCall) <*> optional block)
require = inj <$> (symbol Identifier *> do
funcCall = Ruby.Syntax.Send Nothing <$> selector <*> args
regularCall = symbol Call *> children (Ruby.Syntax.Send <$> (Just <$> postContextualize heredoc expression) <*> selector) <*> args
scopeCall = symbol ScopeResolution *> children (Ruby.Syntax.Send <$> (Just <$> expression) <*> selector) <*> args
dotCall = symbol Call *> children (Ruby.Syntax.Send <$> (Just <$> term expression) <*> pure Nothing <*> args)
selector = Just <$> term methodSelector
require = inj <$> ((symbol Identifier <|> symbol Identifier') *> do
s <- source s <- source
guard (s `elem` ["require", "require_relative"]) guard (s `elem` ["require", "require_relative"])
Ruby.Syntax.Require (s == "require_relative") <$> nameExpression) Ruby.Syntax.Require (s == "require_relative") <$> nameExpression)
@ -302,14 +314,22 @@ methodCall = makeTerm' <$> symbol MethodCall <*> children (require <|> load <|>
s <- source s <- source
guard (s == "load") guard (s == "load")
Ruby.Syntax.Load <$> loadArgs) Ruby.Syntax.Load <$> loadArgs)
args = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children (many expression) <|> pure []
loadArgs = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children (some expression) loadArgs = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children (some expression)
nameExpression = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children expression nameExpression = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children expression
call :: Assignment methodSelector :: Assignment
call = makeTerm <$> symbol Call <*> children (Expression.MemberAccess <$> expression <*> (args <|> expressions)) methodSelector = makeTerm <$> symbols <*> (Syntax.Identifier <$> (name <$> source))
where where
args = (symbol ArgumentList <|> symbol ArgumentListWithParens) *> children expressions symbols = symbol Identifier
<|> symbol Identifier'
<|> symbol Constant
<|> symbol Operator
<|> symbol Super -- TODO(@charliesome): super calls are *not* method calls and need to be assigned into their own syntax terms
call :: Assignment
call = makeTerm <$> symbol Call <*> children (
(Ruby.Syntax.Send <$> (Just <$> term expression) <*> (Just <$> methodSelector) <*> pure [] <*> pure Nothing) <|>
(Ruby.Syntax.Send <$> (Just <$> term expression) <*> pure Nothing <*> args <*> pure Nothing))
rescue :: Assignment rescue :: Assignment
rescue = rescue' rescue = rescue'
@ -405,7 +425,8 @@ invert term = makeTerm <$> location <*> fmap Expression.Not term
-- | Match a term optionally preceded by comment(s), or a sequence of comments if the term is not present. -- | Match a term optionally preceded by comment(s), or a sequence of comments if the term is not present.
term :: Assignment -> Assignment term :: Assignment -> Assignment
term term = contextualize comment term <|> makeTerm1 <$> (Syntax.Context <$> some1 comment <*> emptyTerm) term term = contextualize comment term <|> makeTerm1 <$> (Syntax.Context <$> some1 (comment <|> heredocEnd) <*> emptyTerm)
where heredocEnd = makeTerm <$> symbol HeredocEnd <*> (Literal.TextElement <$> source)
-- | Match a series of terms or comments until a delimiter is matched. -- | Match a series of terms or comments until a delimiter is matched.
manyTermsTill :: Assignment.Assignment [] Grammar Term -> Assignment.Assignment [] Grammar b -> Assignment.Assignment [] Grammar [Term] manyTermsTill :: Assignment.Assignment [] Grammar Term -> Assignment.Assignment [] Grammar b -> Assignment.Assignment [] Grammar [Term]

View File

@ -36,6 +36,27 @@ maybeFailNotFound name = maybeFail notFound
cleanNameOrPath :: ByteString -> String cleanNameOrPath :: ByteString -> String
cleanNameOrPath = BC.unpack . dropRelativePrefix . stripQuotes cleanNameOrPath = BC.unpack . dropRelativePrefix . stripQuotes
data Send a = Send { sendReceiver :: Maybe a, sendSelector :: Maybe a, sendArgs :: [a], sendBlock :: Maybe a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable, FreeVariables1)
instance Eq1 Send where liftEq = genericLiftEq
instance Ord1 Send where liftCompare = genericLiftCompare
instance Show1 Send where liftShowsPrec = genericLiftShowsPrec
instance Evaluatable Send where
eval Send{..} = do
let sel = case sendSelector of
Just sel -> subtermValue sel
Nothing -> variable (name "call")
func <- case sendReceiver of
Just recv -> do
recvEnv <- subtermValue recv >>= scopedEnvironment
localEnv (mappend recvEnv) sel
Nothing -> sel -- TODO Does this require `localize` so we don't leak terms when resolving `sendSelector`?
call func (map subtermValue sendArgs) -- TODO pass through sendBlock
data Require a = Require { requireRelative :: Bool, requirePath :: !a } data Require a = Require { requireRelative :: Bool, requirePath :: !a }
deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable, FreeVariables1) deriving (Diffable, Eq, Foldable, Functor, GAlign, Generic1, Mergeable, Ord, Show, Traversable, FreeVariables1)

View File

@ -5,7 +5,6 @@
( (
(Try (Try
{ ([]) { ([])
->(Call ->(Send
{+(Identifier)+} {+(Identifier)+}
{+(TextElement)+} {+(TextElement)+}) }))))
{+(Empty)+}) }))))

View File

@ -4,8 +4,7 @@
(Identifier) (Identifier)
( (
(Try (Try
{ (Call { (Send
{-(Identifier)-} {-(Identifier)-}
{-(TextElement)-} {-(TextElement)-})
{-(Empty)-})
->([]) })))) ->([]) }))))

View File

@ -4,7 +4,6 @@
(Identifier) (Identifier)
( (
(Try (Try
(Call (Send
(Identifier) (Identifier)
(TextElement) (TextElement))))))
(Empty))))))

View File

@ -1,12 +1,10 @@
(Program (Program
(Try (Try
( (
(Call (Send
(Identifier) (Identifier))
(Empty))
(Else (Else
(Empty) (Empty)
{ ([]) { ([])
->(Call ->(Send
{+(Identifier)+} {+(Identifier)+}) }))))
{+(Empty)+}) }))))

View File

@ -1,12 +1,10 @@
(Program (Program
(Try (Try
( (
(Call (Send
(Identifier) (Identifier))
(Empty))
(Else (Else
(Empty) (Empty)
{ (Call { (Send
{-(Identifier)-} {-(Identifier)-})
{-(Empty)-})
->([]) })))) ->([]) }))))

View File

@ -1,9 +1,8 @@
(Program (Program
(Try (Try
( (
(Call (Send
(Identifier) (Identifier))
(Empty))
(Else (Else
(Empty) (Empty)
([]))))) ([])))))

View File

@ -1,11 +1,9 @@
(Program (Program
(Try (Try
( (
(Call (Send
(Identifier) (Identifier))
(Empty))
(Else (Else
(Empty) (Empty)
(Call (Send
(Identifier) (Identifier))))))
(Empty))))))

View File

@ -2,13 +2,11 @@
(If (If
(Identifier) (Identifier)
( (
(Call (Send
(Identifier) (Identifier)))
(Empty)))
(If (If
(Identifier) (Identifier)
( (
{+(Call {+(Send
{+(Identifier)+} {+(Identifier)+})+})
{+(Empty)+})+})
(Empty)))) (Empty))))

View File

@ -2,13 +2,11 @@
(If (If
(Identifier) (Identifier)
( (
(Call (Send
(Identifier) (Identifier)))
(Empty)))
(If (If
(Identifier) (Identifier)
([] ([]
{-(Call {-(Send
{-(Identifier)-} {-(Identifier)-})-})
{-(Empty)-})-})
(Empty)))) (Empty))))

View File

@ -2,9 +2,8 @@
(If (If
(Identifier) (Identifier)
( (
(Call (Send
(Identifier) (Identifier)))
(Empty)))
(If (If
(Identifier) (Identifier)
([]) ([])

View File

@ -2,13 +2,11 @@
(If (If
(Identifier) (Identifier)
( (
(Call (Send
(Identifier) (Identifier)))
(Empty)))
(If (If
(Identifier) (Identifier)
( (
(Call (Send
(Identifier) (Identifier)))
(Empty)))
(Empty)))) (Empty))))

View File

@ -6,10 +6,9 @@
{+(Integer)+} {+(Integer)+}
{+(Integer)+} {+(Integer)+}
{+(Integer)+})+} {+(Integer)+})+}
{+(Call {+(Send
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+} {+(Identifier)+})+})+}
{+(Empty)+})+})+}
{-(ForEach {-(ForEach
{-( {-(
{-(Identifier)-})-} {-(Identifier)-})-}

View File

@ -22,10 +22,9 @@
{+(Integer)+} {+(Integer)+}
{+(Integer)+} {+(Integer)+}
{+(Empty)+}) } {+(Empty)+}) }
{ (Call { (Send
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-} {-(Identifier)-})
{-(Empty)-})
->(Boolean) }) ->(Boolean) })
{+(ForEach {+(ForEach
{+( {+(

View File

@ -6,7 +6,6 @@
(Integer) (Integer)
(Integer) (Integer)
(Integer)) (Integer))
(Call (Send
(Identifier) (Identifier)
(Identifier) (Identifier))))
(Empty))))

View File

@ -1,12 +1,9 @@
(Program (Program
{+(Call {+(Send
{+(MemberAccess {+(Send
{+(Call
{+(Identifier)+} {+(Identifier)+}
{+(TextElement)+} {+(TextElement)+}
{+(TextElement)+} {+(TextElement)+})+}
{+(Empty)+})+}
{+(Identifier)+})+} {+(Identifier)+})+}
{+(Empty)+})+}
{-(TextElement)-} {-(TextElement)-}
{-(TextElement)-}) {-(TextElement)-})

View File

@ -1,12 +1,9 @@
(Program (Program
{+(TextElement)+} {+(TextElement)+}
{+(TextElement)+} {+(TextElement)+}
{-(Call {-(Send
{-(MemberAccess {-(Send
{-(Call
{-(Identifier)-} {-(Identifier)-}
{-(TextElement)-} {-(TextElement)-}
{-(TextElement)-} {-(TextElement)-})-}
{-(Empty)-})-} {-(Identifier)-})-})
{-(Identifier)-})-}
{-(Empty)-})-})

View File

@ -1,10 +1,7 @@
(Program (Program
(Call (Send
(MemberAccess (Send
(Call
(Identifier) (Identifier)
(TextElement) (TextElement)
(TextElement) (TextElement))
(Empty)) (Identifier)))
(Identifier))
(Empty)))

View File

@ -1,18 +1,19 @@
(Program (Program
{-(Call (Send
{-(Identifier)-}
{-(Hash)-}
{-(Empty)-})-}
(Call
(Identifier) (Identifier)
(Function (Function
(Empty) (Empty)
{+(Identifier)+} {+(Identifier)+}
{ (Identifier) { ([])
->(Plus ->(Plus
{+(Identifier)+} {+(Identifier)+}
{+(Integer)+}) })) {+(Integer)+}) }))
{-(Call {-(Send
{-(Identifier)-}
{-(Function
{-(Empty)-}
{-(Identifier)-})-})-}
{-(Send
{-(Identifier)-} {-(Identifier)-}
{-(Function {-(Function
{-(Empty)-} {-(Empty)-}

View File

@ -1,9 +1,5 @@
(Program (Program
{+(Call (Send
{+(Identifier)+}
{+(Hash)+}
{+(Empty)+})+}
(Call
(Identifier) (Identifier)
(Function (Function
(Empty) (Empty)
@ -11,8 +7,13 @@
{ (Plus { (Plus
{-(Identifier)-} {-(Identifier)-}
{-(Integer)-}) {-(Integer)-})
->(Identifier) })) ->([]) }))
{+(Call {+(Send
{+(Identifier)+}
{+(Function
{+(Empty)+}
{+(Identifier)+})+})+}
{+(Send
{+(Identifier)+} {+(Identifier)+}
{+(Function {+(Function
{+(Empty)+} {+(Empty)+}

View File

@ -1,14 +1,15 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(Hash) (Function
(Empty)) (Empty)
(Call ([])))
(Send
(Identifier) (Identifier)
(Function (Function
(Empty) (Empty)
(Identifier))) (Identifier)))
(Call (Send
(Identifier) (Identifier)
(Function (Function
(Empty) (Empty)

View File

@ -1,5 +1,5 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(Function (Function
(Empty) (Empty)

View File

@ -1,10 +1,9 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(KeyValue (KeyValue
(Symbol) (Symbol)
(Boolean)) (Boolean))
{+(KeyValue {+(KeyValue
{+(Symbol)+} {+(Symbol)+}
{+(Integer)+})+} {+(Integer)+})+}))
(Empty)))

View File

@ -1,10 +1,9 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(KeyValue (KeyValue
(Symbol) (Symbol)
(Boolean)) (Boolean))
{-(KeyValue {-(KeyValue
{-(Symbol)-} {-(Symbol)-}
{-(Integer)-})-} {-(Integer)-})-}))
(Empty)))

View File

@ -1,7 +1,6 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(KeyValue (KeyValue
(Symbol) (Symbol)
(Boolean)) (Boolean))))
(Empty)))

View File

@ -1,10 +1,9 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(KeyValue (KeyValue
(Symbol) (Symbol)
(Boolean)) (Boolean))
(KeyValue (KeyValue
(Symbol) (Symbol)
(Integer)) (Integer))))
(Empty)))

View File

@ -1,10 +1,9 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(KeyValue (KeyValue
(Identifier) (Identifier)
(Boolean)) (Boolean))
{+(KeyValue {+(KeyValue
{+(Identifier)+} {+(Identifier)+}
{+(Integer)+})+} {+(Integer)+})+}))
(Empty)))

View File

@ -1,10 +1,9 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(KeyValue (KeyValue
(Identifier) (Identifier)
(Boolean)) (Boolean))
{-(KeyValue {-(KeyValue
{-(Identifier)-} {-(Identifier)-}
{-(Integer)-})-} {-(Integer)-})-}))
(Empty)))

View File

@ -1,7 +1,6 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(KeyValue (KeyValue
(Identifier) (Identifier)
(Boolean)) (Boolean))))
(Empty)))

View File

@ -1,10 +1,9 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(KeyValue (KeyValue
(Identifier) (Identifier)
(Boolean)) (Boolean))
(KeyValue (KeyValue
(Identifier) (Identifier)
(Integer)) (Integer))))
(Empty)))

View File

@ -1,11 +1,9 @@
(Program (Program
(Call (Send
{ (MemberAccess
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-}) { (Identifier)
->(Identifier) } ->(Identifier) })
(Empty)) {-(Send
{-(Call
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-} {-(Identifier)-}
@ -14,16 +12,13 @@
{-(Integer)-})-} {-(Integer)-})-}
{-(KeyValue {-(KeyValue
{-(Identifier)-} {-(Identifier)-}
{-(Integer)-})-} {-(Integer)-})-})-}
{-(Empty)-})-} {-(Send
{-(Call
{-(Identifier)-} {-(Identifier)-}
{-(Call {-(Send
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-} {-(Identifier)-})-})-}
{-(Empty)-})-} {-(Send
{-(Empty)-})-}
{-(Call
{-(Identifier)-} {-(Identifier)-}
{-(KeyValue {-(KeyValue
{-(Array)-} {-(Array)-}
@ -35,5 +30,4 @@
{-(Identifier)-} {-(Identifier)-}
{-(Function {-(Function
{-(Empty)-} {-(Empty)-}
{-(Integer)-})-})-} {-(Integer)-})-})-})-})
{-(Empty)-})-})

View File

@ -1,11 +1,9 @@
(Program (Program
(Call (Send
{ (Identifier)
->(MemberAccess
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+}) } { (Identifier)
(Empty)) ->(Identifier) })
{+(Call {+(Send
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+} {+(Identifier)+}
@ -14,16 +12,13 @@
{+(Integer)+})+} {+(Integer)+})+}
{+(KeyValue {+(KeyValue
{+(Identifier)+} {+(Identifier)+}
{+(Integer)+})+} {+(Integer)+})+})+}
{+(Empty)+})+} {+(Send
{+(Call
{+(Identifier)+} {+(Identifier)+}
{+(Call {+(Send
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+} {+(Identifier)+})+})+}
{+(Empty)+})+} {+(Send
{+(Empty)+})+}
{+(Call
{+(Identifier)+} {+(Identifier)+}
{+(KeyValue {+(KeyValue
{+(Array)+} {+(Array)+}
@ -35,5 +30,4 @@
{+(Identifier)+} {+(Identifier)+}
{+(Function {+(Function
{+(Empty)+} {+(Empty)+}
{+(Integer)+})+})+} {+(Integer)+})+})+})+})
{+(Empty)+})+})

View File

@ -1,10 +1,8 @@
(Program (Program
(Call (Send
(MemberAccess
(Identifier) (Identifier)
(Identifier)) (Identifier))
(Empty)) (Send
(Call
(Identifier) (Identifier)
(Identifier) (Identifier)
(Identifier) (Identifier)
@ -13,16 +11,13 @@
(Integer)) (Integer))
(KeyValue (KeyValue
(Identifier) (Identifier)
(Integer)) (Integer)))
(Empty)) (Send
(Call
(Identifier) (Identifier)
(Call (Send
(Identifier) (Identifier)
(Identifier) (Identifier)))
(Empty)) (Send
(Empty))
(Call
(Identifier) (Identifier)
(KeyValue (KeyValue
(Array) (Array)
@ -34,5 +29,4 @@
(Identifier) (Identifier)
(Function (Function
(Empty) (Empty)
(Integer))) (Integer)))))
(Empty)))

View File

@ -1,4 +1,3 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)))
(Empty)))

View File

@ -1,25 +1,17 @@
(Program (Program
{+(Call {+(Send
{+(Identifier)+} {+(Identifier)+}
{+(TextElement)+} {+(TextElement)+})+}
{+(Empty)+})+}
{+(Call
{+(MemberAccess
{+(Identifier)+}
{+(Identifier)+})+}
{+(Empty)+})+}
{+(Call
{+(Identifier)+}
{+(Integer)+}
{+(Integer)+}
{+(Empty)+})+}
{+(Call
{+(Identifier)+}
{+(Integer)+}
{+(Integer)+}
{+(Empty)+})+}
{-(Identifier)-} {-(Identifier)-}
{-(MemberAccess (Send
{-(Identifier)-} (Identifier)
{-(Identifier)-})-} (Identifier))
{+(Send
{+(Identifier)+}
{+(Integer)+}
{+(Integer)+})+}
{+(Send
{+(Identifier)+}
{+(Integer)+}
{+(Integer)+})+}
{-(Identifier)-}) {-(Identifier)-})

View File

@ -1,25 +1,17 @@
(Program (Program
{+(Identifier)+} {+(Identifier)+}
{+(MemberAccess {-(Send
{-(Identifier)-}
{-(TextElement)-})-}
(Send
(Identifier)
(Identifier))
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+})+} {-(Send
{+(Identifier)+}
{-(Call
{-(Identifier)-}
{-(TextElement)-}
{-(Empty)-})-}
{-(Call
{-(MemberAccess
{-(Identifier)-}
{-(Identifier)-})-}
{-(Empty)-})-}
{-(Call
{-(Identifier)-} {-(Identifier)-}
{-(Integer)-} {-(Integer)-}
{-(Integer)-} {-(Integer)-})-}
{-(Empty)-})-} {-(Send
{-(Call
{-(Identifier)-} {-(Identifier)-}
{-(Integer)-} {-(Integer)-}
{-(Integer)-} {-(Integer)-})-})
{-(Empty)-})-})

View File

@ -1,6 +1,6 @@
(Program (Program
(Identifier) (Identifier)
(MemberAccess (Send
(Identifier) (Identifier)
(Identifier)) (Identifier))
(Identifier)) (Identifier))

View File

@ -1,20 +1,15 @@
(Program (Program
(Call (Send
(Identifier) (Identifier)
(TextElement) (TextElement))
(Empty)) (Send
(Call
(MemberAccess
(Identifier) (Identifier)
(Identifier)) (Identifier))
(Empty)) (Send
(Call
(Identifier) (Identifier)
(Integer) (Integer)
(Integer) (Integer))
(Empty)) (Send
(Call
(Identifier) (Identifier)
(Integer) (Integer)
(Integer) (Integer)))
(Empty)))

View File

@ -37,17 +37,17 @@
{-(Identifier)-})-} {-(Identifier)-})-}
{-(Assignment {-(Assignment
{-( {-(
{-(MemberAccess {-(Send
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-})-} {-(Identifier)-})-}
{-(MemberAccess {-(Send
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-})-})-} {-(Identifier)-})-})-}
{-( {-(
{-(MemberAccess {-(Send
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-})-} {-(Identifier)-})-}
{-(MemberAccess {-(Send
{-(Identifier)-} {-(Identifier)-}
{-(Identifier)-})-})-})-} {-(Identifier)-})-})-})-}
{-(Assignment {-(Assignment

View File

@ -37,17 +37,17 @@
{+(Identifier)+})+} {+(Identifier)+})+}
{+(Assignment {+(Assignment
{+( {+(
{+(MemberAccess {+(Send
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+})+} {+(Identifier)+})+}
{+(MemberAccess {+(Send
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+})+})+} {+(Identifier)+})+})+}
{+( {+(
{+(MemberAccess {+(Send
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+})+} {+(Identifier)+})+}
{+(MemberAccess {+(Send
{+(Identifier)+} {+(Identifier)+}
{+(Identifier)+})+})+})+} {+(Identifier)+})+})+})+}
{+(Assignment {+(Assignment

View File

@ -36,17 +36,17 @@
(Identifier)) (Identifier))
(Assignment (Assignment
( (
(MemberAccess (Send
(Identifier) (Identifier)
(Identifier)) (Identifier))
(MemberAccess (Send
(Identifier) (Identifier)
(Identifier))) (Identifier)))
( (
(MemberAccess (Send
(Identifier) (Identifier)
(Identifier)) (Identifier))
(MemberAccess (Send
(Identifier) (Identifier)
(Identifier)))) (Identifier))))
(Assignment (Assignment

View File

@ -10,7 +10,8 @@
{+(Identifier)+})+} {+(Identifier)+})+}
{+(Assignment {+(Assignment
{+(Identifier)+} {+(Identifier)+}
{+(Not{+(Identifier)+})+})+} {+(Not
{+(Identifier)+})+})+}
{-(Not {-(Not
{-(Equal {-(Equal
{-(Identifier)-} {-(Identifier)-}

View File

@ -17,4 +17,5 @@
{-(Identifier)-})-} {-(Identifier)-})-}
{-(Assignment {-(Assignment
{-(Identifier)-} {-(Identifier)-}
{-(Not{-(Identifier)-})-})- }) {-(Not
{-(Identifier)-})-})-})

View File

@ -2,10 +2,9 @@
(Require (Require
{ (TextElement) { (TextElement)
->(TextElement) }) ->(TextElement) })
(Call (Send
{ (Identifier) { (Identifier)
->(Identifier) } ->(Identifier) }
{+(Symbol)+} {+(Symbol)+}
{+(TextElement)+} {+(TextElement)+}
{-(Identifier)-} {-(Identifier)-}))
(Empty)))

View File

@ -2,10 +2,9 @@
(Require (Require
{ (TextElement) { (TextElement)
->(TextElement) }) ->(TextElement) })
(Call (Send
{ (Identifier) { (Identifier)
->(Identifier) } ->(Identifier) }
{+(Identifier)+} {+(Identifier)+}
{-(Symbol)-} {-(Symbol)-}
{-(TextElement)-} {-(TextElement)-}))
(Empty)))

View File

@ -1,7 +1,6 @@
(Program (Program
(Require (Require
(TextElement)) (TextElement))
(Call (Send
(Identifier) (Identifier)
(Identifier) (Identifier)))
(Empty)))

View File

@ -1,8 +1,7 @@
(Program (Program
(Require (Require
(TextElement)) (TextElement))
(Call (Send
(Identifier) (Identifier)
(Symbol) (Symbol)
(TextElement) (TextElement)))
(Empty)))

@ -1 +1 @@
Subproject commit c753eea52bbee0927d36b5de4cf83c155b2698ef Subproject commit 2e090ceb0c33393b7c2b920228cb6ce6b8e65811