================================================================================
generators/forGeneratorInMixins
================================================================================

foo {
  bar = new Listing {} |> mapEnv(new Dynamic {
    res1Name = "res1Value"
    res2Name = "res2Value"
  })
  baz = new Listing {} |> mapEnvLiteral(new Dynamic {
    res3Name = "res3Value"
    res4Name = "res4Value"
  })
}

function mapEnv(_env: Dynamic) = new Mixin {
  for (k, v in _env) {
    new {
      name = k
      value = v
    }
  }
  for (k, v in _env) {
    new {
      name = k + " 2"
      value = v + " 2"
    }
  }
}

function mapEnvLiteral(_env: Dynamic) = (it) -> (it) {
  for (k, v in _env) {
    new {
      name = k
      value = v
    }
  }
  for (k, v in _env) {
    new {
      name = k + " 2"
      value = v + " 2"
    }
  }
}

--------------------------------------------------------------------------------

(module
  (classProperty
    (identifier)
    (objectBody
      (objectProperty
        (identifier)
        (binaryExpr
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody))
          (methodCallExpr
            (identifier)
            (argumentList
              (newExpr
                (type
                  (qualifiedIdentifier
                    (identifier)))
                (objectBody
                  (objectProperty
                    (identifier)
                    (slStringLiteral))
                  (objectProperty
                    (identifier)
                    (slStringLiteral))))))))
      (objectProperty
        (identifier)
        (binaryExpr
          (newExpr
            (type
              (qualifiedIdentifier
                (identifier)))
            (objectBody))
          (methodCallExpr
            (identifier)
            (argumentList
              (newExpr
                (type
                  (qualifiedIdentifier
                    (identifier)))
                (objectBody
                  (objectProperty
                    (identifier)
                    (slStringLiteral))
                  (objectProperty
                    (identifier)
                    (slStringLiteral))))))))))
  (classMethod
    (methodHeader
      (identifier)
      (parameterList
        (typedIdentifier
          (identifier)
          (typeAnnotation
            (type
              (qualifiedIdentifier
                (identifier)))))))
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (forGenerator
          (typedIdentifier
            (identifier))
          (typedIdentifier
            (identifier))
          (variableExpr
            (identifier))
          (objectBody
            (objectElement
              (newExpr
                (objectBody
                  (objectProperty
                    (identifier)
                    (variableExpr
                      (identifier)))
                  (objectProperty
                    (identifier)
                    (variableExpr
                      (identifier))))))))
        (forGenerator
          (typedIdentifier
            (identifier))
          (typedIdentifier
            (identifier))
          (variableExpr
            (identifier))
          (objectBody
            (objectElement
              (newExpr
                (objectBody
                  (objectProperty
                    (identifier)
                    (binaryExpr
                      (variableExpr
                        (identifier))
                      (slStringLiteral)))
                  (objectProperty
                    (identifier)
                    (binaryExpr
                      (variableExpr
                        (identifier))
                      (slStringLiteral)))))))))))
  (classMethod
    (methodHeader
      (identifier)
      (parameterList
        (typedIdentifier
          (identifier)
          (typeAnnotation
            (type
              (qualifiedIdentifier
                (identifier)))))))
    (functionLiteral
      (parameterList
        (typedIdentifier
          (identifier)))
      (objectLiteral
        (parenthesizedExpr
          (variableExpr
            (identifier)))
        (objectBody
          (forGenerator
            (typedIdentifier
              (identifier))
            (typedIdentifier
              (identifier))
            (variableExpr
              (identifier))
            (objectBody
              (objectElement
                (newExpr
                  (objectBody
                    (objectProperty
                      (identifier)
                      (variableExpr
                        (identifier)))
                    (objectProperty
                      (identifier)
                      (variableExpr
                        (identifier))))))))
          (forGenerator
            (typedIdentifier
              (identifier))
            (typedIdentifier
              (identifier))
            (variableExpr
              (identifier))
            (objectBody
              (objectElement
                (newExpr
                  (objectBody
                    (objectProperty
                      (identifier)
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (slStringLiteral)))
                    (objectProperty
                      (identifier)
                      (binaryExpr
                        (variableExpr
                          (identifier))
                        (slStringLiteral)))))))))))))
