From 4f5141c59ee3b104a06c0a68bd9e7f72cb758c47 Mon Sep 17 00:00:00 2001 From: Rick Winfrey Date: Fri, 17 Jun 2016 14:38:50 -0500 Subject: [PATCH] Add SubscriptAccess case to termConstructor --- src/Parser.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Parser.hs b/src/Parser.hs index 586cab50b..9da2cdace 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -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 ->