================================================================================
api/xmlRenderer1.xml
================================================================================

import "pkl:xml"

class Person {
  name: String
  age: Int
  address: Address
  friend: Person?
}

class Address {
  street: String
}

int = 123

float = 1.23

bool = true

string = "Pigeon"

unicodeString = "abc😀abc😎abc"

multiLineString = """
  have a
  great
  day
  """

typedObject = new Person {
  name = "Pigeon"
  age = 30
  address {
    street = "Folsom St."
  }
  friend = null
}

dynamicObject {
  name = "Pigeon"
  age = 30
  address {
    street = "Folsom St."
  }
  friend = null
}

output {
  renderer = new xml.Renderer {}
}

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

(module
  (importClause
    (stringConstant))
  (clazz
    (identifier)
    (classBody
      (classProperty
        (identifier)
        (typeAnnotation
          (type
            (qualifiedIdentifier
              (identifier)))))
      (classProperty
        (identifier)
        (typeAnnotation
          (type
            (qualifiedIdentifier
              (identifier)))))
      (classProperty
        (identifier)
        (typeAnnotation
          (type
            (qualifiedIdentifier
              (identifier)))))
      (classProperty
        (identifier)
        (typeAnnotation
          (type
            (type
              (qualifiedIdentifier
                (identifier))))))))
  (clazz
    (identifier)
    (classBody
      (classProperty
        (identifier)
        (typeAnnotation
          (type
            (qualifiedIdentifier
              (identifier)))))))
  (classProperty
    (identifier)
    (intLiteral))
  (classProperty
    (identifier)
    (floatLiteral))
  (classProperty
    (identifier)
    (trueLiteral))
  (classProperty
    (identifier)
    (slStringLiteral))
  (classProperty
    (identifier)
    (slStringLiteral))
  (classProperty
    (identifier)
    (mlStringLiteral))
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (objectProperty
          (identifier)
          (slStringLiteral))
        (objectProperty
          (identifier)
          (intLiteral))
        (objectProperty
          (identifier)
          (objectBody
            (objectProperty
              (identifier)
              (slStringLiteral))))
        (objectProperty
          (identifier)
          (nullLiteral)))))
  (classProperty
    (identifier)
    (objectBody
      (objectProperty
        (identifier)
        (slStringLiteral))
      (objectProperty
        (identifier)
        (intLiteral))
      (objectProperty
        (identifier)
        (objectBody
          (objectProperty
            (identifier)
            (slStringLiteral))))
      (objectProperty
        (identifier)
        (nullLiteral))))
  (classProperty
    (identifier)
    (objectBody
      (objectProperty
        (identifier)
        (newExpr
          (type
            (qualifiedIdentifier
              (identifier)
              (identifier)))
          (objectBody))))))
