================================================================================
api/yamlParser6
================================================================================

import "pkl:yaml"

local parser = new yaml.Parser {
  useMapping = true
}

local parsed = parser.parse("""
  foo: bar
  baz:
    -
      biz: biz
      buz: buz
  """)

res1 = parsed

res2 = parsed is Mapping

res3 = parsed["baz"][0] is Mapping

res4 = parser.parse("""
  ? baz: qux
  : 2
  foo: bar
  """)

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

(module
  (importClause
    (stringConstant))
  (classProperty
    (modifier)
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)
          (identifier)))
      (objectBody
        (objectProperty
          (identifier)
          (trueLiteral)))))
  (classProperty
    (modifier)
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (mlStringLiteral))))
  (classProperty
    (identifier)
    (variableExpr
      (identifier)))
  (classProperty
    (identifier)
    (isExpr
      (variableExpr
        (identifier))
      (type
        (qualifiedIdentifier
          (identifier)))))
  (classProperty
    (identifier)
    (isExpr
      (subscriptExpr
        (subscriptExpr
          (variableExpr
            (identifier))
          (slStringLiteral))
        (intLiteral))
      (type
        (qualifiedIdentifier
          (identifier)))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (mlStringLiteral)))))
