1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 06:11:49 +03:00

Add SubscriptAccess case to termConstructor

This commit is contained in:
Rick Winfrey 2016-06-17 14:38:50 -05:00
parent 34359f80ee
commit 4f5141c59e

View File

@ -46,6 +46,8 @@ termConstructor source info = cofree . construct
(identifier:value:[]) -> withDefaultInfo $ S.Assignment identifier value
construct children | MemberAccess == category info = case children of
(base:property:[]) -> withDefaultInfo $ S.MemberAccess base property
construct children | SubscriptAccess == category info = case children of
(base:element:[]) -> withDefaultInfo $ S.SubscriptAccess base element
construct children | Function == category info = withDefaultInfo $ case children of
(body:[]) -> S.Function Nothing Nothing body
(params:body:[]) | (info :< _) <- runCofree params, Params == category info ->