From 70f0c29758b0c98a4f42a92402fd83cae94e8587 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 5 Apr 2017 16:14:48 -0400 Subject: [PATCH] Define assignment of a child term. --- src/Language/Ruby/Syntax.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Language/Ruby/Syntax.hs b/src/Language/Ruby/Syntax.hs index 45a9cb1b8..025cef22c 100644 --- a/src/Language/Ruby/Syntax.hs +++ b/src/Language/Ruby/Syntax.hs @@ -29,6 +29,7 @@ data AssignmentF symbol a where Rule :: symbol -> AssignmentF symbol a Content :: AssignmentF symbol ByteString Children :: AssignmentF symbol [a] + Child :: AssignmentF symbol a And :: a -> a -> AssignmentF symbol a rule :: symbol -> Assignment symbol a @@ -40,6 +41,9 @@ content = Content `Then` return children :: Assignment symbol [Assignment symbol a] children = Children `Then` return +child :: Assignment symbol a +child = Child `Then` return + -- | A program in some syntax functor, over which we can perform analyses. type Program = Freer