Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add parentheses lambda params #607

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/src/main/scala/scalaxb/compiler/Module.scala
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ trait Module {
}

def missingDependencies(importable: Importable, files: collection.Seq[Importable]): List[String] = {
val nsBased = importable.importNamespaces.toList flatMap { ns: String =>
val nsBased = importable.importNamespaces.toList flatMap { (ns: String) =>
files filter { x =>
val targetNamespace: Option[String] = x.targetNamespace
targetNamespace == Option(ns)
Expand Down
16 changes: 8 additions & 8 deletions cli/src/main/scala/scalaxb/compiler/wsdl11/Driver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class Driver extends Module { driver =>
def processDefinition(definition: XDefinitionsType, context: Context): Unit = {
val ns = definition.targetNamespace map {_.toString}

extractChildren(definition, "message") { x: XMessageType => context.messages((ns, x.name)) = x }
extractChildren(definition, "portType") { x: XPortTypeType => context.interfaces((ns, x.name)) = x }
extractChildren(definition, "binding") { x: XBindingType => context.bindings((ns, x.name)) = x }
extractChildren(definition, "service") { x: XServiceType => context.services((ns, x.name)) = x }
extractChildren(definition, "message") { (x: XMessageType) => context.messages((ns, x.name)) = x }
extractChildren(definition, "portType") { (x: XPortTypeType) => context.interfaces((ns, x.name)) = x }
extractChildren(definition, "binding") { (x: XBindingType) => context.bindings((ns, x.name)) = x }
extractChildren(definition, "service") { (x: XServiceType) => context.services((ns, x.name)) = x }
}

override def generateProtocol(snippet: Snippet,
Expand Down Expand Up @@ -114,7 +114,7 @@ class Driver extends Module { driver =>

val wsdlgenerated: Seq[(Option[String], Snippet, String)] = pair.definition.toList map { wsdl =>
val pkg = packageName(wsdl.targetNamespace map {_.toString}, cntxt)
val bindings = extractChildren(wsdl, "binding") { x: XBindingType => x }
val bindings = extractChildren(wsdl, "binding") { (x: XBindingType) => x }
generator.soap11Bindings(bindings) foreach { _ => cntxt.soap11 = true }
generator.soap12Bindings(bindings) foreach { _ => cntxt.soap12 = true }
(pkg, Snippet(headerSnippet(pkg), generator.generate(wsdl, bindings)), part)
Expand All @@ -133,7 +133,7 @@ class Driver extends Module { driver =>
lazy val (wsdl: Option[XDefinitionsType], xsdRawSchema: Seq[Node]) = alocation.toString match {
case FileExtension(".wsdl") =>
val w = masked.scalaxb.fromXML[XDefinitionsType](rawschema)
val x: Seq[Node] = extractChildren(w, "types") { t: XTypesType => t } flatMap { _.any collect {
val x: Seq[Node] = extractChildren(w, "types") { (t: XTypesType) => t } flatMap { _.any collect {
case DataRecord(_, _, node: Node) => node
}}
(Some(w), x)
Expand All @@ -149,7 +149,7 @@ class Driver extends Module { driver =>

lazy val importNamespaces: Seq[String] =
(wsdl map { wsdl =>
extractChildren(wsdl, "import") { x: XImportType => x.namespace.toString }
extractChildren(wsdl, "import") { (x: XImportType) => x.namespace.toString }
} getOrElse {Nil}) ++
(schemaLite flatMap { schemaLite =>
schemaLite.imports collect {
Expand All @@ -158,7 +158,7 @@ class Driver extends Module { driver =>

val importLocations: Seq[String] =
(wsdl map { wsdl =>
extractChildren(wsdl, "import") { x: XImportType => x.location.toString }
extractChildren(wsdl, "import") { (x: XImportType) => x.location.toString }
} getOrElse {Nil}) ++
(schemaLite flatMap { schemaLite =>
schemaLite.imports collect {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/main/scala/scalaxb/compiler/wsdl11/GenSource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ trait {interfaceTypeName}{taglessTypeConstraint} {{ self =>
val (headerParts, bodyParts) = splitParamToParts(output, binding.output)
(bodyParts map toParamCache) ++ (headerParts map toParamCache)
}
outputOpt flatMap { output: XParamType =>
outputOpt flatMap { (output: XParamType) =>
isMultiPart(output, binding.output) map { _ =>
"case class %s(%s)".format(
makeOperationOutputWrapperName(op),
Expand Down
2 changes: 1 addition & 1 deletion cli/src/main/scala/scalaxb/compiler/xsd/Lookup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ trait Lookup extends ContextProcessor {
_.topElems.valuesIterator.toSeq collect {
case e: ElemDecl if e.name == elem.name && e.namespace == elem.namespace => e
case e: ElemDecl if e.substitutionGroup == Some(elem.namespace, elem.name) => e
} filter { e: ElemDecl =>
} filter { (e: ElemDecl) =>
e.typeSymbol match {
case ReferenceTypeSymbol(decl: ComplexTypeDecl) => !decl.abstractValue
case _ => true
Expand Down