@@ -36,7 +36,7 @@ muTypeDecl (InterfaceTypeDecl decl) = muInterfaceTypeDecl decl
3636muClass (ClassDecl _ name _ superclass interfaces (ClassBody body)) =
3737 Class (i name) (fmap muRefType superclass) (compact (map muImplements interfaces ++ concatMap muDecl body))
3838
39- muInterface (InterfaceDecl _ name _ interfaces (InterfaceBody body)) =
39+ muInterface (InterfaceDecl _ _ name _ interfaces (InterfaceBody body)) =
4040 Interface (i name) (map muRefType interfaces) (compactConcatMap muMemberDecl body)
4141
4242muClassTypeDecl clazz@ (ClassDecl modifiers name args _ _ _) = decorate modifiers . muDeclaration name args $ muClass clazz
@@ -45,7 +45,7 @@ muClassTypeDecl (EnumDecl modifiers name _ (EnumBody constants _)) =
4545
4646muImplements interface = Implement $ Reference (muRefType interface)
4747
48- muInterfaceTypeDecl interface@ (InterfaceDecl _ name args _ _) = muDeclaration name args $ muInterface interface
48+ muInterfaceTypeDecl interface@ (InterfaceDecl _ _ name args _ _) = muDeclaration name args $ muInterface interface
4949
5050muDeclaration _ [] decl = decl
5151muDeclaration name args decl = Sequence [ModuleSignature (i name) (map prettyPrint args), decl]
@@ -56,17 +56,17 @@ muDecl (InitDecl _ block) = [muBlock block]
5656
5757muMemberDecl :: MemberDecl -> [Expression ]
5858muMemberDecl (FieldDecl modifiers typ varDecls) = decorateMany modifiers . concatMap (variableToAttribute. muVarDecl typ) $ varDecls
59- muMemberDecl (MethodDecl (elem (Annotation (MarkerAnnotation (Name [Ident " Test" ]))) -> True ) _ Nothing (Ident name) [] _ body)
59+ muMemberDecl (MethodDecl (elem (Annotation (MarkerAnnotation (Name [Ident " Test" ]))) -> True ) _ Nothing (Ident name) [] _ _ body)
6060 = return $ Test (MuString name) (muMethodBody body)
61- muMemberDecl (MethodDecl (elem Static -> True ) _ Nothing (Ident " main" ) [_] _ body)
61+ muMemberDecl (MethodDecl (elem Static -> True ) _ Nothing (Ident " main" ) [_] _ _ body)
6262 = return $ EntryPoint " main" (muMethodBody body)
63- muMemberDecl (MethodDecl modifiers typeParams typ name params _ (MethodBody Nothing ))
63+ muMemberDecl (MethodDecl modifiers typeParams typ name params _ _ (MethodBody Nothing ))
6464 = return $ decorate modifiers $ muMethodSignature name params typ typeParams
65- muMemberDecl (MethodDecl (elem Public -> True ) _ _ (Ident " equals" ) params _ body)
65+ muMemberDecl (MethodDecl (elem Public -> True ) _ _ (Ident " equals" ) params _ _ body)
6666 = return $ PrimitiveMethod O. Equal [SimpleEquation (map muFormalParam params) (muMethodBody body)]
67- muMemberDecl (MethodDecl (elem Public -> True ) _ _ (Ident " hashCode" ) params _ body)
67+ muMemberDecl (MethodDecl (elem Public -> True ) _ _ (Ident " hashCode" ) params _ _ body)
6868 = return $ PrimitiveMethod O. Hash [SimpleEquation (map muFormalParam params) (muMethodBody body)]
69- muMemberDecl (MethodDecl modifiers typeParams returnType name params _ body) = decorateMany modifiers [
69+ muMemberDecl (MethodDecl modifiers typeParams returnType name params _ _ body) = decorateMany modifiers [
7070 muMethodSignature name params returnType typeParams,
7171 SimpleMethod (i name) (map muFormalParam params) (muMethodBody body)]
7272muMemberDecl e@ (ConstructorDecl _ _ _ _params _ _constructorBody) = return . debug $ e
@@ -133,7 +133,9 @@ muExp (BinOp arg1 op arg2) = Send (muExp arg1) (muOp op) [muExp arg
133133muExp (Cond cond ifTrue ifFalse) = If (muExp cond) (muExp ifTrue) (muExp ifFalse)
134134muExp (ExpName name) = muName name
135135muExp (Assign lhs EqualA exp ) = muAssignment lhs (muExp exp )
136- muExp (InstanceCreation _ clazz args _) = New (Reference $ r clazz) (map muExp args)
136+ muExp (InstanceCreation _ (TypeDeclSpecifier clazz) args _) = New (Reference $ r clazz) (map muExp args)
137+ muExp (InstanceCreation _ (TypeDeclSpecifierWithDiamond clazz _ _) args _) = New (Reference $ r clazz) (map muExp args)
138+ muExp (InstanceCreation _ (TypeDeclSpecifierUnqualifiedWithDiamond (Ident i) _) args _) = New (Reference i) (map muExp args)
137139muExp (PreNot exp ) | PrimitiveSend r O. Equal [a] <- (muExp exp ) = PrimitiveSend r O. NotEqual [a]
138140 | otherwise = PrimitiveSend (muExp exp ) O. Negation []
139141muExp (Lambda params exp ) = M. Lambda (muLambdaParams params) (muLambdaExp exp )
0 commit comments