1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 11:46:14 +03:00

Fix lambdas

This commit is contained in:
Timothy Clem 2017-08-24 14:48:29 -07:00
parent fef4fb1c41
commit 0bbeefb8b2
8 changed files with 179 additions and 111 deletions

View File

@ -1,9 +1,13 @@
(Program
(AnonymousFunction
(Function
(Identifier)
{-(Identifier)-}
{-(Identifier)-}
{-(Identifier)-}
(ExpressionStatements
{+(Identifier)+}
{-(IntegerLiteral)-}
{-(IntegerLiteral)-})))
(
(Function
(Empty)
(
{ (Integer)
->(Identifier) }
{-(Integer)-})))))

View File

@ -1,9 +1,13 @@
(Program
(AnonymousFunction
(Function
(Identifier)
{+(Identifier)+}
{+(Identifier)+}
{+(Identifier)+}
(ExpressionStatements
{+(IntegerLiteral)+}
{+(IntegerLiteral)+}
{-(Identifier)-})))
(
(Function
(Empty)
(
{ (Identifier)
->(Integer) }
{+(Integer)+})))))

View File

@ -1,8 +1,12 @@
(Program
(AnonymousFunction
(Function
(Identifier)
(Identifier)
(Identifier)
(ExpressionStatements
(IntegerLiteral)
(IntegerLiteral))))
(Identifier)
(
(Function
(Empty)
(
(Integer)
(Integer))))))

View File

@ -1,4 +1,8 @@
(Program
(AnonymousFunction
(ExpressionStatements
(Identifier))))
(Function
(Identifier)
(
(Function
(Empty)
(
(Identifier))))))

View File

@ -1,43 +1,61 @@
(Program
{+(MethodCall
{+(Call
(Identifier)
(Params
(Identifier))
(Binary
(Function
(Empty)
(Identifier)
(Other "+")
(IntegerLiteral)))+}
{-(MethodCall
(
(Plus
(Identifier)
(Integer)))))+}
{-(Call
(Identifier)
(Object))-}
{-(MethodCall
(Hash)
(Empty))-}
{-(Call
(Identifier)
(Identifier))-}
{-(MethodCall
(Function
(Empty)
(
(Identifier))))-}
{-(Call
(Identifier)
(Params
(Function
(Empty)
(Identifier)
(KeywordParameter
(Identifier)
(Boolean))
(OptionalParameter
(Identifier)
(Identifier)))
(IntegerLiteral))-}
{-(AnonymousFunction
(ExpressionStatements))-}
{-(AnonymousFunction
(ExpressionStatements
(Identifier)))-}
{-(AnonymousFunction
(Identifier)
(Identifier)
(
(Integer))))-}
{-(Function
(Identifier)
(ExpressionStatements
(IntegerLiteral)))-}
{-(AnonymousFunction
(
(Function
(Empty)
([]))))-}
{-(Function
(Identifier)
(SplatParameter
(Identifier))
(Other "destructured_parameter"
(
(Function
(Empty)
(
(Identifier)))))-}
{-(Function
(Identifier)
(Identifier)
(
(Function
(Empty)
(
(Integer)))))-}
{-(Function
(Identifier)
(Identifier)
(Identifier)
(
(Identifier)
(Identifier))
(ExpressionStatements))-})
(
(Function
(Empty)
([]))))-})

View File

@ -1,40 +1,56 @@
(Program
{+(MethodCall
{+(Call
(Identifier)
(Object))+}
{+(MethodCall
(Hash)
(Empty))+}
{+(Call
(Identifier)
(Identifier))+}
(MethodCall
(Function
(Empty)
(
(Identifier))))+}
(Call
(Identifier)
(Params
(Function
(Empty)
{ (Identifier)
->(Identifier) }
{+(KeywordParameter
(Identifier)
(Boolean))+}
{+(OptionalParameter
(Identifier)
(Identifier))+})
{+(IntegerLiteral)+}
{-(Binary
(Identifier)
(Other "+")
(IntegerLiteral))-})
{+(AnonymousFunction
(ExpressionStatements))+}
{+(AnonymousFunction
(ExpressionStatements
(Identifier)))+}
{+(AnonymousFunction
{+(Identifier)+}
{+(Identifier)+}
(
{+(Integer)+}
{-(Plus
(Identifier)
(Integer))-})))
{+(Function
(Identifier)
(ExpressionStatements
(IntegerLiteral)))+}
{+(AnonymousFunction
(
(Function
(Empty)
([]))))+}
{+(Function
(Identifier)
(SplatParameter
(Identifier))
(Other "destructured_parameter"
(
(Function
(Empty)
(
(Identifier)))))+}
{+(Function
(Identifier)
(Identifier)
(
(Function
(Empty)
(
(Integer)))))+}
{+(Function
(Identifier)
(Identifier)
(Identifier)
(
(Identifier)
(Identifier))
(ExpressionStatements))+})
(
(Function
(Empty)
([]))))+})

View File

@ -1,35 +1,52 @@
(Program
(MethodCall
(Call
(Identifier)
(Object))
(MethodCall
(Hash)
(Empty))
(Call
(Identifier)
(Identifier))
(MethodCall
(Function
(Empty)
(
(Identifier))))
(Call
(Identifier)
(Params
(Function
(Empty)
(Identifier)
(KeywordParameter
(Identifier)
(Boolean))
(OptionalParameter
(Identifier)
(Identifier)))
(IntegerLiteral))
(AnonymousFunction
(ExpressionStatements))
(AnonymousFunction
(ExpressionStatements
(Identifier)))
(AnonymousFunction
(Identifier)
(Identifier)
(
(Integer))))
(Function
(Identifier)
(ExpressionStatements
(IntegerLiteral)))
(AnonymousFunction
(
(Function
(Empty)
([]))))
(Function
(Identifier)
(SplatParameter
(Identifier))
(Other "destructured_parameter"
(
(Function
(Empty)
(
(Identifier)))))
(Function
(Identifier)
(Identifier)
(
(Function
(Empty)
(
(Integer)))))
(Function
(Identifier)
(Identifier)
(Identifier)
(
(Identifier)
(Identifier))
(ExpressionStatements)))
(
(Function
(Empty)
([])))))

View File

@ -1,9 +1,10 @@
(Program
(MethodCall
(Call
(Identifier)
(Params
(Identifier))
(Binary
(Function
(Empty)
(Identifier)
(Other "+")
(IntegerLiteral))))
(
(Plus
(Identifier)
(Integer))))))