================================================================================
api/propertiesRenderer9.properties
================================================================================

name = "pigeon"
age = 42
friends = new Listing {
  "barn owl"
  "parrot"
}
moreFriends = new {
  "elf owl"
  "eagle"
}
couple = Pair(name, friends[1])
hobbies {
  ["surfing"] {
    skill = "low"
  }
  ["firemaking"] {
    skill = "high"
  }
}
classification {
  ["red wolf"] {
    description = "confidential"
  }
  ["pink panther"] {
    description = "top secret"
  }
}
address {
  street = "Norton St."
  zip = 12345
}

output {
  renderer = new PropertiesRenderer {
    converters {
      ["name"] = (it) -> it.reverse()
      ["hobbies[*]"] = (it) -> it.skill
      ["address.street"] = (_) -> "Other St."
      ["address.*"] = (_) -> "changed"
      ["classification[pink panther]"] = (_) -> "official"
      ["classification[*]"] = (it) -> it.description
      ["unmatched"] = (_) -> "unmatched"
      [Listing] = (it) -> jsonRenderer.renderValue(it)
      [Pair] = (it) -> jsonRenderer.renderValue(List(it.first, it.second))
    }
    local jsonRenderer = new JsonRenderer {
      indent = ""
      converters {
        ["[*]"] = (it) -> it + "x"
      }
    }
  }
}

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

(module
  (classProperty
    (identifier)
    (slStringLiteral))
  (classProperty
    (identifier)
    (intLiteral))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (objectElement
          (slStringLiteral))
        (objectElement
          (slStringLiteral)))))
  (classProperty
    (identifier)
    (newExpr
      (objectBody
        (objectElement
          (slStringLiteral))
        (objectElement
          (slStringLiteral)))))
  (classProperty
    (identifier)
    (methodCallExpr
      (identifier)
      (argumentList
        (variableExpr
          (identifier))
        (subscriptExpr
          (variableExpr
            (identifier))
          (intLiteral)))))
  (classProperty
    (identifier)
    (objectBody
      (objectEntry
        (slStringLiteral)
        (objectBody
          (objectProperty
            (identifier)
            (slStringLiteral))))
      (objectEntry
        (slStringLiteral)
        (objectBody
          (objectProperty
            (identifier)
            (slStringLiteral))))))
  (classProperty
    (identifier)
    (objectBody
      (objectEntry
        (slStringLiteral)
        (objectBody
          (objectProperty
            (identifier)
            (slStringLiteral))))
      (objectEntry
        (slStringLiteral)
        (objectBody
          (objectProperty
            (identifier)
            (slStringLiteral))))))
  (classProperty
    (identifier)
    (objectBody
      (objectProperty
        (identifier)
        (slStringLiteral))
      (objectProperty
        (identifier)
        (intLiteral))))
  (classProperty
    (identifier)
    (objectBody
      (objectProperty
        (identifier)
        (newExpr
          (type
            (qualifiedIdentifier
              (identifier)))
          (objectBody
            (objectProperty
              (identifier)
              (objectBody
                (objectEntry
                  (slStringLiteral)
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (methodCallExpr
                      (variableExpr
                        (identifier))
                      (identifier)
                      (argumentList))))
                (objectEntry
                  (slStringLiteral)
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (propertyCallExpr
                      (variableExpr
                        (identifier))
                      (identifier))))
                (objectEntry
                  (slStringLiteral)
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (slStringLiteral)))
                (objectEntry
                  (slStringLiteral)
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (slStringLiteral)))
                (objectEntry
                  (slStringLiteral)
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (slStringLiteral)))
                (objectEntry
                  (slStringLiteral)
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (propertyCallExpr
                      (variableExpr
                        (identifier))
                      (identifier))))
                (objectEntry
                  (slStringLiteral)
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (slStringLiteral)))
                (objectEntry
                  (variableExpr
                    (identifier))
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (methodCallExpr
                      (variableExpr
                        (identifier))
                      (identifier)
                      (argumentList
                        (variableExpr
                          (identifier))))))
                (objectEntry
                  (variableExpr
                    (identifier))
                  (functionLiteral
                    (parameterList
                      (typedIdentifier
                        (identifier)))
                    (methodCallExpr
                      (variableExpr
                        (identifier))
                      (identifier)
                      (argumentList
                        (methodCallExpr
                          (identifier)
                          (argumentList
                            (propertyCallExpr
                              (variableExpr
                                (identifier))
                              (identifier))
                            (propertyCallExpr
                              (variableExpr
                                (identifier))
                              (identifier))))))))))
            (objectProperty
              (modifier)
              (identifier)
              (newExpr
                (type
                  (qualifiedIdentifier
                    (identifier)))
                (objectBody
                  (objectProperty
                    (identifier)
                    (slStringLiteral))
                  (objectProperty
                    (identifier)
                    (objectBody
                      (objectEntry
                        (slStringLiteral)
                        (functionLiteral
                          (parameterList
                            (typedIdentifier
                              (identifier)))
                          (binaryExpr
                            (variableExpr
                              (identifier))
                            (slStringLiteral)))))))))))))))
