diff --git a/morphir/src/org/finos/morphir/ir/gen1/moduleName.scala b/morphir/src/org/finos/morphir/ir/gen1/moduleName.scala index 7cee7131f..11af0ee6f 100644 --- a/morphir/src/org/finos/morphir/ir/gen1/moduleName.scala +++ b/morphir/src/org/finos/morphir/ir/gen1/moduleName.scala @@ -2,10 +2,9 @@ package org.finos.morphir.ir.gen1 trait ModuleNameModule { self: NameModule with PathModule => - /** - * A module name is a unique identifier for a module within a package. It is represented by a `Path`, which is a - * "list" of names. - */ + /** A module name is a unique identifier for a module within a package. It is represented by a `Path`, which is a + * "list" of names. + */ sealed case class ModuleName(path: Path) { self => /// Construct a new module name by concatting the given module name to this one. diff --git a/morphir/src/org/finos/morphir/ir/gen1/name.scala b/morphir/src/org/finos/morphir/ir/gen1/name.scala index 8fab37412..9ef448a78 100644 --- a/morphir/src/org/finos/morphir/ir/gen1/name.scala +++ b/morphir/src/org/finos/morphir/ir/gen1/name.scala @@ -4,11 +4,10 @@ import scala.annotation.tailrec trait NameModule { - /** - * `Name` is an abstraction of human-readable identifiers made up of words. This abstraction allows us to use the same - * identifiers across various naming conventions used by the different frontend and backend languages Morphir - * integrates with. - */ + /** `Name` is an abstraction of human-readable identifiers made up of words. This abstraction allows us to use the + * same identifiers across various naming conventions used by the different frontend and backend languages Morphir + * integrates with. + */ sealed case class Name private (toList: List[String]) { self => // def :+(that: String): Name = Name(self.toList :+ that) @@ -27,9 +26,9 @@ trait NameModule { @tailrec def loop( - prefix: List[String], - abbrev: List[String], - suffix: List[String] + prefix: List[String], + abbrev: List[String], + suffix: List[String] ): List[String] = suffix match { case Nil => @@ -51,9 +50,8 @@ trait NameModule { loop(List.empty, List.empty, words.toList) } - /** - * Maps segments of the `Name`. - */ + /** Maps segments of the `Name`. + */ def mapParts(f: String => String): Name = Name(self.toList.map(f)) def mkString(f: String => String)(sep: String): String = @@ -105,18 +103,16 @@ trait NameModule { private val pattern = """([a-zA-Z][a-z]*|[0-9]+)""".r - /** - * Converts a list of strings into a name. NOTE: When this function is used, the strings are used as is to construct - * the name, and don't go through any processing. This behavior is desired here as it is consistent with Morphir's - * semantics for this function as defined in the `morphir-elm` project. - */ + /** Converts a list of strings into a name. NOTE: When this function is used, the strings are used as is to + * construct the name, and don't go through any processing. This behavior is desired here as it is consistent with + * Morphir's semantics for this function as defined in the `morphir-elm` project. + */ def fromList(list: List[String]): Name = Name(list) - /** - * Converts a list of strings into a name. NOTE: When this function is used, the strings are used as is to construct - * the name, and don't go through any processing. This behavior is desired here as it is consistent with Morphir's - * semantics for this function as defined in the `morphir-elm` project. - */ + /** Converts a list of strings into a name. NOTE: When this function is used, the strings are used as is to + * construct the name, and don't go through any processing. This behavior is desired here as it is consistent with + * Morphir's semantics for this function as defined in the `morphir-elm` project. + */ def fromList(list: String*): Name = fromList(list.toList) def fromIterable(iterable: Iterable[String]): Name =