From e3a6de8d9e40e2a47527831048ef7fd0b56bfb44 Mon Sep 17 00:00:00 2001 From: joshvera Date: Fri, 11 Aug 2017 17:01:19 -0400 Subject: [PATCH] Make readonly' an Assignment --- src/Language/TypeScript/Syntax.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Language/TypeScript/Syntax.hs b/src/Language/TypeScript/Syntax.hs index e9252644a..f82715b02 100644 --- a/src/Language/TypeScript/Syntax.hs +++ b/src/Language/TypeScript/Syntax.hs @@ -178,14 +178,15 @@ destructuringPattern = makeTerm <$> symbol ObjectPattern <*> (Literal.Hash <$> m spreadElement :: Assignment spreadElement = symbol SpreadElement *> children expression -readonly' = symbol Readonly *> children source +readonly' :: Assignment +readonly' = makeTerm <$> symbol Readonly <*> children (Syntax.Identifier <$> source) methodDefinition :: Assignment methodDefinition = makeVisibility <$> symbol MethodDefinition <*> children ((,,,,,) <$> optional accessibilityModifier' <*> optional readonly' <*> emptyTerm <*> propertyName <*> callSignature <*> statements) where - makeVisibility loc (modifier, empty, readonly, propertyName, callSignature, statements) = maybe method'' (\x -> makeTerm loc (Type.Visibility (maybe method'' (const (makeReadonly loc method'')) readonly) x)) modifier + makeVisibility loc (modifier, readonly, empty, propertyName, callSignature, statements) = maybe method'' (\x -> makeTerm loc (Type.Visibility (maybe method'' (const (makeReadonly loc method'')) readonly) x)) modifier where method'' = method' loc empty propertyName callSignature statements method' loc term name signature statements = makeTerm loc (Declaration.Method term name signature statements)