@@ -66,15 +66,15 @@ object json {
66
66
67
67
private def entToJson (ent : Entity ): String = ent match {
68
68
case ent : Package =>
69
- s """ {"name": ${ent.name.json},"members": ${ent.members.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"package"} """
69
+ s """ {"name": ${ent.name.json},"members": ${ent.members.sortBy(_.name). map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"package"} """
70
70
case ent : Class =>
71
- s """ {"name": ${ent.name.json},"members": ${ent.members.map(_.json).mkString(" [" ," ," ," ]" )},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"typeParams": ${ent.typeParams.map(_.json).mkString(" [" ," ," ," ]" )},"superTypes": ${ent.superTypes.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"class"} """
71
+ s """ {"name": ${ent.name.json},"members": ${ent.members.sortBy(_.name). map(_.json).mkString(" [" ," ," ," ]" )},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"typeParams": ${ent.typeParams.map(_.json).mkString(" [" ," ," ," ]" )},"superTypes": ${ent.superTypes.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"class"} """
72
72
case ent : CaseClass =>
73
- s """ {"name": ${ent.name.json},"members": ${ent.members.map(_.json).mkString(" [" ," ," ," ]" )},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"typeParams": ${ent.typeParams.map(_.json).mkString(" [" ," ," ," ]" )},"superTypes": ${ent.superTypes.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"case class"} """
73
+ s """ {"name": ${ent.name.json},"members": ${ent.members.sortBy(_.name). map(_.json).mkString(" [" ," ," ," ]" )},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"typeParams": ${ent.typeParams.map(_.json).mkString(" [" ," ," ," ]" )},"superTypes": ${ent.superTypes.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"case class"} """
74
74
case ent : Trait =>
75
- s """ {"name": ${ent.name.json},"members": ${ent.members.map(_.json).mkString(" [" ," ," ," ]" )},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"typeParams": ${ent.typeParams.map(_.json).mkString(" [" ," ," ," ]" )},"superTypes": ${ent.superTypes.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"trait"} """
75
+ s """ {"name": ${ent.name.json},"members": ${ent.members.sortBy(_.name). map(_.json).mkString(" [" ," ," ," ]" )},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"typeParams": ${ent.typeParams.map(_.json).mkString(" [" ," ," ," ]" )},"superTypes": ${ent.superTypes.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"trait"} """
76
76
case ent : Object =>
77
- s """ {"name": ${ent.name.json},"members": ${ent.members.map(_.json).mkString(" [" ," ," ," ]" )},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"superTypes": ${ent.superTypes.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"object"} """
77
+ s """ {"name": ${ent.name.json},"members": ${ent.members.sortBy(_.name). map(_.json).mkString(" [" ," ," ," ]" )},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"superTypes": ${ent.superTypes.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"object"} """
78
78
case ent : Def =>
79
79
s """ {"name": ${ent.name.json},"modifiers": ${ent.modifiers.map(_.json).mkString(" [" ," ," ," ]" )},"path": ${ent.path.map(_.json).mkString(" [" ," ," ," ]" )},"returnValue": ${ent.returnValue.json},"typeParams": ${ent.typeParams.map(_.json).mkString(" [" ," ," ," ]" )},"paramLists": ${ent.paramLists.map(_.json).mkString(" [" ," ," ," ]" )}, ${ent.comment.map(_.json).fold(" " )(cmt => s """ "comment": $cmt, """ )}"kind":"def"} """
80
80
case ent : Val =>
0 commit comments