================================================================================
basic/identifier
================================================================================

amends "../snippetTest.pkl"

local `this` = 42 // keyword
local `that` = 43 // regular identifier
local `quick brown fox` = 44 // irregular identifier

local obj = new {
  `this` = 42
  `that` = 43
  `quick brown fox` = 44
}

examples {
  ["variable"] {
    `this`
    `that`
    `quick brown fox`
  }

  ["property"] {
    obj.`this`
    obj.`that`
    obj.`quick brown fox`
  }

  ["string interpolation"] {
    "\(`this`)"
    "\(`that`)"
    "\(`quick brown fox`)"
  }

  ["multiline string interpolation"] {
    """
    \(`this`)
    """
    """
    \(`that`)
    """
    """
    \(`quick brown fox`)
    """
  }
}

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

(module
  (moduleHeader
    (extendsOrAmendsClause
      (stringConstant)))
  (classProperty
    (modifier)
    (identifier)
    (intLiteral))
  (lineComment)
  (classProperty
    (modifier)
    (identifier)
    (intLiteral))
  (lineComment)
  (classProperty
    (modifier)
    (identifier)
    (intLiteral))
  (lineComment)
  (classProperty
    (modifier)
    (identifier)
    (newExpr
      (objectBody
        (objectProperty
          (identifier)
          (intLiteral))
        (objectProperty
          (identifier)
          (intLiteral))
        (objectProperty
          (identifier)
          (intLiteral)))))
  (classProperty
    (identifier)
    (objectBody
      (objectEntry
        (slStringLiteral)
        (objectBody
          (objectElement
            (variableExpr
              (identifier)))
          (objectElement
            (variableExpr
              (identifier)))
          (objectElement
            (variableExpr
              (identifier)))))
      (objectEntry
        (slStringLiteral)
        (objectBody
          (objectElement
            (propertyCallExpr
              (variableExpr
                (identifier))
              (identifier)))
          (objectElement
            (propertyCallExpr
              (variableExpr
                (identifier))
              (identifier)))
          (objectElement
            (propertyCallExpr
              (variableExpr
                (identifier))
              (identifier)))))
      (objectEntry
        (slStringLiteral)
        (objectBody
          (objectElement
            (slStringLiteral
              (interpolationExpr
                (variableExpr
                  (identifier)))))
          (objectElement
            (slStringLiteral
              (interpolationExpr
                (variableExpr
                  (identifier)))))
          (objectElement
            (slStringLiteral
              (interpolationExpr
                (variableExpr
                  (identifier)))))))
      (objectEntry
        (slStringLiteral)
        (objectBody
          (objectElement
            (mlStringLiteral
              (interpolationExpr
                (variableExpr
                  (identifier)))))
          (objectElement
            (mlStringLiteral
              (interpolationExpr
                (variableExpr
                  (identifier)))))
          (objectElement
            (mlStringLiteral
              (interpolationExpr
                (variableExpr
                  (identifier))))))))))
