================================================================================
listings2/numberLiterals
================================================================================

// if a semicolon or newline occurs before a minus operator, the latter is interpreted as unary rather than binary minus.
// in all other cases, semicolons and newlines are treated as whitespace and have no meaning.
res1 = new Listing {
  when (false) { 0 }
  2
  - 1    // unary minus
  2; - 1 // unary minus
  2 - 1  // binary minus

  // chain of binary operators
  2 -
  1
  + 2 *
  3
  / 4

  1;; +; 2; // binary operator (semicolon is treated as whitespace and may occur anywhere)
}

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

(module
  (lineComment)
  (lineComment)
  (classProperty
    (identifier)
    (newExpr
      (type
        (qualifiedIdentifier
          (identifier)))
      (objectBody
        (whenGenerator
          (falseLiteral)
          (objectBody
            (objectElement
              (intLiteral))))
        (objectElement
          (binaryExpr
            (intLiteral)
            (intLiteral)))
        (lineComment)
        (objectElement
          (intLiteral))
        (objectElement
          (unaryExpr
            (intLiteral)))
        (lineComment)
        (objectElement
          (intLiteral))
        (objectElement
          (unaryExpr
            (intLiteral)))
        (lineComment)
        (lineComment)
        (objectElement
          (intLiteral))
        (objectElement
          (binaryExpr
            (unaryExpr
              (intLiteral))
            (binaryExpr
              (binaryExpr
                (intLiteral)
                (intLiteral))
              (intLiteral))))
        (objectElement
          (binaryExpr
            (intLiteral)
            (intLiteral)))
        (lineComment)))))
