mirror of
https://github.com/github/semantic.git
synced 2024-11-28 01:47:01 +03:00
Remove ty from Method and throw every part of a call signature into a list
This commit is contained in:
parent
89f307edf0
commit
b5f9938279
@ -89,10 +89,9 @@ algorithmWithTerms t1 t2 = maybe (linearly t1 t2) (fmap annotate) $ case (unwrap
|
||||
S.Class <$> linearly identifierA identifierB
|
||||
<*> byRWS clausesA clausesB
|
||||
<*> byRWS expressionsA expressionsB
|
||||
(S.Method identifierA receiverA tyA paramsA expressionsA, S.Method identifierB receiverB tyB paramsB expressionsB) -> Just $
|
||||
(S.Method identifierA receiverA paramsA expressionsA, S.Method identifierB receiverB paramsB expressionsB) -> Just $
|
||||
S.Method <$> linearly identifierA identifierB
|
||||
<*> maybeLinearly receiverA receiverB
|
||||
<*> maybeLinearly tyA tyB
|
||||
<*> byRWS paramsA paramsB
|
||||
<*> byRWS expressionsA expressionsB
|
||||
(S.Function idA paramsA bodyA, S.Function idB paramsB bodyB) -> Just $
|
||||
|
@ -58,11 +58,11 @@ termAssignment source category children = case (category, children) of
|
||||
(IncrementStatement, _) -> Just $ S.Leaf (toText source)
|
||||
(DecrementStatement, _) -> Just $ S.Leaf (toText source)
|
||||
(QualifiedIdentifier, _) -> Just $ S.Leaf (toText source)
|
||||
(Method, [receiverParams, name, body]) -> Just (S.Method name (Just receiverParams) Nothing [] (toList (unwrap body)))
|
||||
(Method, [receiverParams, name, body]) -> Just (S.Method name (Just receiverParams) [] (toList (unwrap body)))
|
||||
(Method, [receiverParams, name, params, body])
|
||||
-> Just (S.Method name (Just receiverParams) Nothing (toList (unwrap params)) (toList (unwrap body)))
|
||||
-> Just (S.Method name (Just receiverParams) [params] (toList (unwrap body)))
|
||||
(Method, [receiverParams, name, params, ty, body])
|
||||
-> Just (S.Method name (Just receiverParams) (Just ty) (toList (unwrap params)) (toList (unwrap body)))
|
||||
-> Just (S.Method name (Just receiverParams) [params, ty] (toList (unwrap body)))
|
||||
_ -> Nothing
|
||||
|
||||
categoryForGoName :: Text -> Category
|
||||
|
@ -43,8 +43,8 @@ termAssignment _ category children
|
||||
, Finally <- Info.category (extract finally)
|
||||
-> Just $ S.Try [body] [catch] Nothing (Just finally)
|
||||
(ArrayLiteral, _) -> Just $ S.Array Nothing children
|
||||
(Method, [ identifier, params, exprs ]) -> Just $ S.Method identifier Nothing Nothing (toList (unwrap params)) (toList (unwrap exprs))
|
||||
(Method, [ identifier, exprs ]) -> Just $ S.Method identifier Nothing Nothing [] (toList (unwrap exprs))
|
||||
(Method, [ identifier, params, exprs ]) -> Just $ S.Method identifier Nothing [params] (toList (unwrap exprs))
|
||||
(Method, [ identifier, exprs ]) -> Just $ S.Method identifier Nothing [] (toList (unwrap exprs))
|
||||
(Class, [ identifier, superclass, definitions ]) -> Just $ S.Class identifier [superclass] (toList (unwrap definitions))
|
||||
(Class, [ identifier, definitions ]) -> Just $ S.Class identifier [] (toList (unwrap definitions))
|
||||
(Import, [ statements, identifier ] ) -> Just $ S.Import identifier (toList (unwrap statements))
|
||||
|
@ -67,15 +67,15 @@ termAssignment _ category children
|
||||
(SingletonMethod, expr : methodName : rest)
|
||||
| params : body <- rest
|
||||
, Params <- Info.category (extract params)
|
||||
-> Just $ S.Method methodName (Just expr) Nothing (toList (unwrap params)) body
|
||||
-> Just $ S.Method methodName (Just expr) [params] body
|
||||
| Identifier <- Info.category (extract methodName)
|
||||
-> Just $ S.Method methodName (Just expr) Nothing [] rest
|
||||
-> Just $ S.Method methodName (Just expr) [] rest
|
||||
(Method, identifier : rest)
|
||||
| params : body <- rest
|
||||
, Params <- Info.category (extract params)
|
||||
-> Just $ S.Method identifier Nothing Nothing (toList (unwrap params)) body
|
||||
-> Just $ S.Method identifier Nothing [params] body
|
||||
| otherwise
|
||||
-> Just $ S.Method identifier Nothing Nothing [] rest
|
||||
-> Just $ S.Method identifier Nothing [] rest
|
||||
(Module, constant : body ) -> Just $ S.Module constant body
|
||||
(Modifier Rescue, [lhs, rhs] ) -> Just $ S.Rescue [lhs] [rhs]
|
||||
(Rescue, exceptions : exceptionVar : rest)
|
||||
|
@ -50,9 +50,12 @@ termAssignment _ category children =
|
||||
, Finally <- Info.category (extract finally)
|
||||
-> Just $ S.Try [body] [catch] Nothing (Just finally)
|
||||
(ArrayLiteral, _) -> Just $ S.Array Nothing children
|
||||
(Method, [ identifier, params, exprs ]) -> Just $ S.Method identifier Nothing Nothing (toList (unwrap params)) (toList (unwrap exprs))
|
||||
(Method, [ identifier, exprs ]) -> Just $ S.Method identifier Nothing Nothing [] (toList (unwrap exprs))
|
||||
(Class, identifier : rest) -> case Prologue.break (\x -> Info.category (extract x) == Other "class_body") rest of
|
||||
(Method, children) -> case Prologue.break ((== ExpressionStatements) . Info.category . extract) children of
|
||||
(prev, [body]) -> case span ((== Identifier) . Info.category . extract) prev of
|
||||
([id], [callSignature]) -> Just $ S.Method id Nothing (toList (unwrap callSignature)) (toList (unwrap body))
|
||||
_ -> Nothing -- No identifier found or callSignature found.
|
||||
_ -> Nothing -- No body found.``
|
||||
(Class, identifier : rest) -> case Prologue.break ((== Other "class_body") . Info.category . extract) rest of
|
||||
(clauses, [ definitions ]) -> Just $ S.Class identifier clauses (toList (unwrap definitions))
|
||||
_ -> Nothing
|
||||
(Module, [ identifier, definitions ]) -> Just $ S.Module identifier (toList (unwrap definitions))
|
||||
|
@ -103,8 +103,8 @@ syntaxToTermField syntax = case syntax of
|
||||
Fixed c -> childrenFields c
|
||||
S.FunctionCall identifier typeParameters parameters -> [ "identifier" .= identifier ] <> [ "typeArguments" .= typeParameters] <> [ "parameters" .= parameters ]
|
||||
S.Ternary expression cases -> [ "expression" .= expression ] <> [ "cases" .= cases ]
|
||||
S.AnonymousFunction parameters c -> [ "parameters" .= parameters ] <> childrenFields c
|
||||
S.Function identifier parameters c -> [ "identifier" .= identifier ] <> [ "parameters" .= parameters ] <> childrenFields c
|
||||
S.AnonymousFunction callSignature c -> [ "callSignature" .= callSignature ] <> childrenFields c
|
||||
S.Function identifier callSignature c -> [ "identifier" .= identifier ] <> [ "callSignature" .= callSignature ] <> childrenFields c
|
||||
S.Assignment assignmentId value -> [ "identifier" .= assignmentId ] <> [ "value" .= value ]
|
||||
S.OperatorAssignment identifier value -> [ "identifier" .= identifier ] <> [ "value" .= value ]
|
||||
S.MemberAccess identifier value -> [ "identifier" .= identifier ] <> [ "value" .= value ]
|
||||
@ -129,7 +129,7 @@ syntaxToTermField syntax = case syntax of
|
||||
S.Try body catchExpression elseExpression finallyExpression -> [ "body" .= body ] <> [ "catchExpression" .= catchExpression ] <> [ "elseExpression" .= elseExpression ] <> [ "finallyExpression" .= finallyExpression ]
|
||||
S.Array ty c -> [ "type" .= ty ] <> childrenFields c
|
||||
S.Class identifier superclass definitions -> [ "identifier" .= identifier ] <> [ "superclass" .= superclass ] <> [ "definitions" .= definitions ]
|
||||
S.Method identifier receiver ty parameters definitions -> [ "identifier" .= identifier ] <> [ "receiver" .= receiver ] <> [ "type" .= ty ] <> [ "parameters" .= parameters ] <> [ "definitions" .= definitions ]
|
||||
S.Method identifier receiver callSignature definitions -> [ "identifier" .= identifier ] <> [ "receiver" .= receiver ] <> [ "callSignature" .= callSignature ] <> [ "definitions" .= definitions ]
|
||||
S.If expression clauses -> [ "expression" .= expression ] <> childrenFields clauses
|
||||
S.Module identifier definitions -> [ "identifier" .= identifier ] <> [ "definitions" .= definitions ]
|
||||
S.Namespace identifier definitions -> [ "identifier" .= identifier ] <> [ "definitions" .= definitions ]
|
||||
|
@ -269,8 +269,8 @@ toTermName source term = case unwrap term of
|
||||
S.Select clauses -> termNameFromChildren term clauses
|
||||
S.Array ty _ -> maybe (termNameFromSource term) termNameFromSource ty
|
||||
S.Class identifier _ _ -> toTermName' identifier
|
||||
S.Method identifier (Just receiver) _ args _ -> termNameFromSource receiver <> "." <> toTermName' identifier <> paramsToArgNames args
|
||||
S.Method identifier Nothing _ args _ -> toTermName' identifier <> paramsToArgNames args
|
||||
S.Method identifier (Just receiver) args _ -> termNameFromSource receiver <> "." <> toTermName' identifier <> paramsToArgNames args
|
||||
S.Method identifier Nothing args _ -> toTermName' identifier <> paramsToArgNames args
|
||||
S.Comment a -> toS a
|
||||
S.Commented _ _ -> termNameFromChildren term (toList $ unwrap term)
|
||||
S.Module identifier _ -> toTermName' identifier
|
||||
|
@ -166,8 +166,8 @@ termToDiffInfo source term = case unwrap term of
|
||||
toTermName :: forall leaf fields. DefaultFields fields => Int -> Source -> SyntaxTerm leaf fields -> Text
|
||||
toTermName parentOffset parentSource term = case unwrap term of
|
||||
S.Function identifier _ _ -> toTermName' identifier
|
||||
S.Method identifier Nothing _ _ _ -> toTermName' identifier
|
||||
S.Method identifier (Just receiver) _ _ _ -> case unwrap receiver of
|
||||
S.Method identifier Nothing _ _ -> toTermName' identifier
|
||||
S.Method identifier (Just receiver) _ _ -> case unwrap receiver of
|
||||
S.Indexed [receiverParams] -> case unwrap receiverParams of
|
||||
S.ParameterDecl (Just ty) _ -> "(" <> toTermName' ty <> ") " <> toTermName' identifier
|
||||
_ -> toMethodNameWithReceiver receiver identifier
|
||||
|
@ -73,8 +73,8 @@ data Syntax a f
|
||||
| Array (Maybe f) [f]
|
||||
-- | A class with an identifier, superclass, and a list of definitions.
|
||||
| Class f [f] [f]
|
||||
-- | A method definition with an identifier, optional receiver, optional return type, params, and a list of expressions.
|
||||
| Method f (Maybe f) (Maybe f) [f] [f]
|
||||
-- | A method definition with an identifier, optional receiver, optional type arguments, params, optional return type, and a list of expressions.
|
||||
| Method f (Maybe f) [f] [f]
|
||||
-- | An if statement with an expression and maybe more expression clauses.
|
||||
| If f [f]
|
||||
-- | A module with an identifier, and a list of syntaxes.
|
||||
@ -148,7 +148,7 @@ instance Listable2 Syntax where
|
||||
\/ liftCons4 (liftTiers recur) (liftTiers recur) (liftTiers recur) (liftTiers recur) Try
|
||||
\/ liftCons2 (liftTiers recur) (liftTiers recur) Syntax.Array
|
||||
\/ liftCons3 recur (liftTiers recur) (liftTiers recur) Class
|
||||
\/ liftCons5 recur (liftTiers recur) (liftTiers recur) (liftTiers recur) (liftTiers recur) Method
|
||||
\/ liftCons4 recur (liftTiers recur) (liftTiers recur) (liftTiers recur) Method
|
||||
\/ liftCons2 recur (liftTiers recur) If
|
||||
\/ liftCons2 recur (liftTiers recur) Module
|
||||
\/ liftCons2 recur (liftTiers recur) Namespace
|
||||
|
@ -10,7 +10,8 @@
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)))+}
|
||||
|
@ -10,7 +10,8 @@
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)))+}
|
||||
|
@ -10,7 +10,8 @@
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)))-}
|
||||
|
@ -10,7 +10,8 @@
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)))-}
|
||||
|
11
test/fixtures/go/method-declarations.diffA-B.txt
vendored
11
test/fixtures/go/method-declarations.diffA-B.txt
vendored
@ -11,8 +11,9 @@
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier))))
|
||||
(Args
|
||||
(ParameterDecl
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)))
|
||||
(Identifier)))
|
||||
|
11
test/fixtures/go/method-declarations.diffB-A.txt
vendored
11
test/fixtures/go/method-declarations.diffB-A.txt
vendored
@ -11,8 +11,9 @@
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier))))
|
||||
(Args
|
||||
(ParameterDecl
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)))
|
||||
(Identifier)))
|
||||
|
@ -10,7 +10,8 @@
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)))
|
||||
|
@ -10,7 +10,8 @@
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(Args
|
||||
(ParameterDecl
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Identifier)))
|
||||
|
9
test/fixtures/javascript/class.diff+A.txt
vendored
9
test/fixtures/javascript/class.diff+A.txt
vendored
@ -6,16 +6,19 @@
|
||||
(NumberLiteral))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))))+}
|
||||
|
9
test/fixtures/javascript/class.diff+B.txt
vendored
9
test/fixtures/javascript/class.diff+B.txt
vendored
@ -3,16 +3,19 @@
|
||||
(Identifier)
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))))+}
|
||||
|
9
test/fixtures/javascript/class.diff-A.txt
vendored
9
test/fixtures/javascript/class.diff-A.txt
vendored
@ -6,16 +6,19 @@
|
||||
(NumberLiteral))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))))-}
|
||||
|
9
test/fixtures/javascript/class.diff-B.txt
vendored
9
test/fixtures/javascript/class.diff-B.txt
vendored
@ -3,16 +3,19 @@
|
||||
(Identifier)
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))))-}
|
||||
|
18
test/fixtures/javascript/class.diffA-B.txt
vendored
18
test/fixtures/javascript/class.diffA-B.txt
vendored
@ -3,17 +3,20 @@
|
||||
(Identifier)
|
||||
{+(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))+}
|
||||
{+(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))+}
|
||||
{+(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))+}
|
||||
{-(Assignment
|
||||
@ -21,16 +24,19 @@
|
||||
(NumberLiteral))-}
|
||||
{-(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))-}
|
||||
{-(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))-}
|
||||
{-(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))-}))
|
||||
|
9
test/fixtures/javascript/class.diffB-A.txt
vendored
9
test/fixtures/javascript/class.diffB-A.txt
vendored
@ -7,18 +7,21 @@
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))))
|
||||
|
9
test/fixtures/javascript/class.parseA.txt
vendored
9
test/fixtures/javascript/class.parseA.txt
vendored
@ -6,16 +6,19 @@
|
||||
(NumberLiteral))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))))
|
||||
|
9
test/fixtures/javascript/class.parseB.txt
vendored
9
test/fixtures/javascript/class.parseB.txt
vendored
@ -3,16 +3,19 @@
|
||||
(Identifier)
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Return
|
||||
(Identifier)))))
|
||||
|
@ -3,8 +3,9 @@
|
||||
(Object
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Return
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
|
@ -3,8 +3,9 @@
|
||||
(Object
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Return
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
|
@ -3,8 +3,9 @@
|
||||
(Object
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Return
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
|
@ -3,8 +3,9 @@
|
||||
(Object
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Return
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
|
@ -2,11 +2,14 @@
|
||||
(ExpressionStatements
|
||||
(Object
|
||||
(Method
|
||||
{ (Identifier) -> (Identifier) }
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Return
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
{ (Other "+") -> (Other "-") }
|
||||
{ (Other "+")
|
||||
->(Other "-") }
|
||||
(Identifier)))))))
|
||||
|
@ -2,11 +2,14 @@
|
||||
(ExpressionStatements
|
||||
(Object
|
||||
(Method
|
||||
{ (Identifier) -> (Identifier) }
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Return
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
{ (Other "-") -> (Other "+") }
|
||||
{ (Other "-")
|
||||
->(Other "+") }
|
||||
(Identifier)))))))
|
||||
|
@ -3,8 +3,9 @@
|
||||
(Object
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Return
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
|
@ -3,8 +3,9 @@
|
||||
(Object
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier))
|
||||
(Return
|
||||
(MathOperator
|
||||
(Identifier)
|
||||
|
@ -1,3 +1,4 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)))+}
|
||||
(Identifier)
|
||||
(Params)))+}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
(Params
|
||||
(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier)))))+}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)))-}
|
||||
(Identifier)
|
||||
(Params)))-}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
(Params
|
||||
(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier)))))-}
|
||||
|
@ -1,6 +1,8 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
{+(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier))+}))
|
||||
{ (Params)
|
||||
->(Params
|
||||
(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier))) }))
|
||||
|
@ -1,6 +1,8 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
{-(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier))-}))
|
||||
{ (Params
|
||||
(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
->(Params) }))
|
||||
|
@ -1,3 +1,4 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(Params)))
|
||||
|
@ -1,6 +1,7 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(Params
|
||||
(KeywordParameter
|
||||
(Identifier)
|
||||
(Identifier)))))
|
||||
|
@ -1,3 +1,4 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)))+}
|
||||
(Identifier)
|
||||
(Params)))+}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
(Params
|
||||
(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier)))))+}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)))-}
|
||||
(Identifier)
|
||||
(Params)))-}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
(Params
|
||||
(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier)))))-}
|
||||
|
@ -1,6 +1,8 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
{+(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier))+}))
|
||||
{ (Params)
|
||||
->(Params
|
||||
(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier))) }))
|
||||
|
@ -1,6 +1,8 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
{-(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier))-}))
|
||||
{ (Params
|
||||
(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
->(Params) }))
|
||||
|
@ -1,3 +1,4 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(Params)))
|
||||
|
@ -1,6 +1,7 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
(Params
|
||||
(OptionalParameter
|
||||
(Identifier)
|
||||
(Identifier)))))
|
||||
|
@ -1,4 +1,5 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)))+}
|
||||
(Params
|
||||
(Identifier))))+}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)))+}
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))))+}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)))-}
|
||||
(Params
|
||||
(Identifier))))-}
|
||||
|
@ -1,6 +1,7 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)))-}
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))))-}
|
||||
|
@ -1,6 +1,7 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+}))
|
||||
(Params
|
||||
(Identifier)
|
||||
{+(Identifier)+}
|
||||
{+(Identifier)+})))
|
||||
|
@ -1,6 +1,7 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-}))
|
||||
(Params
|
||||
(Identifier)
|
||||
{-(Identifier)-}
|
||||
{-(Identifier)-})))
|
||||
|
@ -1,4 +1,5 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Params
|
||||
(Identifier))))
|
||||
|
@ -1,6 +1,7 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Params
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Identifier))))
|
||||
|
@ -1,3 +1,4 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)))+}
|
||||
(Identifier)
|
||||
(Params)))+}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(KeywordParameter
|
||||
(Identifier))))+}
|
||||
(Params
|
||||
(KeywordParameter
|
||||
(Identifier)))))+}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)))-}
|
||||
(Identifier)
|
||||
(Params)))-}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(KeywordParameter
|
||||
(Identifier))))-}
|
||||
(Params
|
||||
(KeywordParameter
|
||||
(Identifier)))))-}
|
||||
|
@ -1,5 +1,7 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
{+(KeywordParameter
|
||||
(Identifier))+}))
|
||||
{ (Params)
|
||||
->(Params
|
||||
(KeywordParameter
|
||||
(Identifier))) }))
|
||||
|
@ -1,5 +1,7 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
{-(KeywordParameter
|
||||
(Identifier))-}))
|
||||
{ (Params
|
||||
(KeywordParameter
|
||||
(Identifier)))
|
||||
->(Params) }))
|
||||
|
@ -1,3 +1,4 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)))
|
||||
(Identifier)
|
||||
(Params)))
|
||||
|
@ -1,5 +1,6 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(KeywordParameter
|
||||
(Identifier))))
|
||||
(Params
|
||||
(KeywordParameter
|
||||
(Identifier)))))
|
||||
|
@ -1,4 +1,5 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)))+}
|
||||
(Params
|
||||
(Identifier))))+}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(HashSplatParameter)))+}
|
||||
(Params
|
||||
(Identifier)
|
||||
(HashSplatParameter))))+}
|
||||
|
@ -1,4 +1,5 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)))-}
|
||||
(Params
|
||||
(Identifier))))-}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(HashSplatParameter)))-}
|
||||
(Params
|
||||
(Identifier)
|
||||
(HashSplatParameter))))-}
|
||||
|
@ -1,5 +1,6 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
{+(HashSplatParameter)+}))
|
||||
(Params
|
||||
(Identifier)
|
||||
{+(HashSplatParameter)+})))
|
||||
|
@ -1,5 +1,6 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
{-(HashSplatParameter)-}))
|
||||
(Params
|
||||
(Identifier)
|
||||
{-(HashSplatParameter)-})))
|
||||
|
@ -1,4 +1,5 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)))
|
||||
(Params
|
||||
(Identifier))))
|
||||
|
@ -1,5 +1,6 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(HashSplatParameter)))
|
||||
(Params
|
||||
(Identifier)
|
||||
(HashSplatParameter))))
|
||||
|
@ -1,5 +1,6 @@
|
||||
{+(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Identifier)))+}
|
||||
|
@ -1,5 +1,6 @@
|
||||
{-(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Identifier)))-}
|
||||
|
@ -2,5 +2,6 @@
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{+(Identifier)+}
|
||||
{+(Params
|
||||
(Identifier))+}
|
||||
{+(Identifier)+}))
|
||||
|
@ -2,5 +2,6 @@
|
||||
(Method
|
||||
{ (Identifier)
|
||||
->(Identifier) }
|
||||
{-(Identifier)-}
|
||||
{-(Params
|
||||
(Identifier))-}
|
||||
{-(Identifier)-}))
|
||||
|
@ -1,5 +1,6 @@
|
||||
(Program
|
||||
(Method
|
||||
(Identifier)
|
||||
(Identifier)
|
||||
(Params
|
||||
(Identifier))
|
||||
(Identifier)))
|
||||
|
Loading…
Reference in New Issue
Block a user