1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 13:51:44 +03:00

Add MethodCall cases to Syntax and Category

This commit is contained in:
joshvera 2016-06-12 17:26:20 -04:00
parent 086466ab88
commit 2ba33189c4
2 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,8 @@ data Category
| Params
-- | A function's expression statements.
| ExpressionStatements
-- | A method call on an object.
| MethodCall
-- | A string literal.
| StringLiteral
-- | An integer literal.

View File

@ -26,4 +26,7 @@ data Syntax
-- | A member access contains a syntax, and another syntax that identifies a property or value in the first syntax.
-- | e.g. in Javascript x.y represents a member access syntax.
| MemberAccess { memberId :: f, property :: f }
-- | A method call consisting of its target, the method name, and the parameters passed to the method.
-- | e.g. in Javascript console.log('hello') represents a method call.
| MethodCall { targetId :: f, methodId :: f, methodParams :: f }
deriving (Functor, Show, Eq, Foldable, Traversable)