================================================================================
simple tuple
================================================================================

foo = [1, 2, "foo"]

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (tuple
            (tuple_start)
            (expression
              (literal_value
                (numeric_lit)))
            (expression
              (literal_value
                (numeric_lit)))
            (expression
              (literal_value
                (string_lit
                  (quoted_template_start)
                  (template_literal)
                  (quoted_template_end))))
            (tuple_end)))))))

================================================================================
multiline tuple
================================================================================

foo = [
  1,
  2,
  "foo"
]

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (tuple
            (tuple_start)
            (expression
              (literal_value
                (numeric_lit)))
            (expression
              (literal_value
                (numeric_lit)))
            (expression
              (literal_value
                (string_lit
                  (quoted_template_start)
                  (template_literal)
                  (quoted_template_end))))
            (tuple_end)))))))

================================================================================
empty tuple
================================================================================

foo = []

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (tuple
            (tuple_start)
            (tuple_end)))))))

================================================================================
multiline empty tuple
================================================================================

foo = [
]

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (tuple
            (tuple_start)
            (tuple_end)))))))

================================================================================
object
================================================================================

foo = {1: 2, "foo"="bar"}

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (object
            (object_start)
            (object_elem
              (expression
                (literal_value
                  (numeric_lit)))
              (expression
                (literal_value
                  (numeric_lit))))
            (object_elem
              (expression
                (literal_value
                  (string_lit
                    (quoted_template_start)
                    (template_literal)
                    (quoted_template_end))))
              (expression
                (literal_value
                  (string_lit
                    (quoted_template_start)
                    (template_literal)
                    (quoted_template_end)))))
            (object_end)))))))

================================================================================
multiline object
================================================================================

foo = {
  1: 2,
  "foo"="bar"
}

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (object
            (object_start)
            (object_elem
              (expression
                (literal_value
                  (numeric_lit)))
              (expression
                (literal_value
                  (numeric_lit))))
            (object_elem
              (expression
                (literal_value
                  (string_lit
                    (quoted_template_start)
                    (template_literal)
                    (quoted_template_end))))
              (expression
                (literal_value
                  (string_lit
                    (quoted_template_start)
                    (template_literal)
                    (quoted_template_end)))))
            (object_end)))))))

================================================================================
empty object
================================================================================

foo = { }

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (object
            (object_start)
            (object_end)))))))

================================================================================
multiline empty object
================================================================================

foo = {
}

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (object
            (object_start)
            (object_end)))))))

================================================================================
multiline object weird newlines
================================================================================

foo = { 1: 2,
  "foo"="bar"

}

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (object
            (object_start)
            (object_elem
              (expression
                (literal_value
                  (numeric_lit)))
              (expression
                (literal_value
                  (numeric_lit))))
            (object_elem
              (expression
                (literal_value
                  (string_lit
                    (quoted_template_start)
                    (template_literal)
                    (quoted_template_end))))
              (expression
                (literal_value
                  (string_lit
                    (quoted_template_start)
                    (template_literal)
                    (quoted_template_end)))))
            (object_end)))))))

================================================================================
complex object
================================================================================

foo = {
  a = "1",
  b = "2"
}

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (object
            (object_start)
            (object_elem
              (expression
                (variable_expr
                  (identifier)))
              (expression
                (literal_value
                  (string_lit
                    (quoted_template_start)
                    (template_literal)
                    (quoted_template_end)))))
            (object_elem
              (expression
                (variable_expr
                  (identifier)))
              (expression
                (literal_value
                  (string_lit
                    (quoted_template_start)
                    (template_literal)
                    (quoted_template_end)))))
            (object_end)))))))

================================================================================
complex from real world
================================================================================

worker_groups = [
    {
      name                          = "jasonb-test-group-1"
      instance_type                 = "t2.small"
      asg_desired_capacity          = 2
      additional_security_group_ids = [aws_security_group.external_connection.id]
    },
    {
      name                          = "jasonb-test-group-2"
      instance_type                 = "t2.medium"
      additional_security_group_ids = [aws_security_group.external_connection.id]
      asg_desired_capacity          = 1
    },
  ]

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

(config_file
  (body
    (attribute
      (identifier)
      (expression
        (collection_value
          (tuple
            (tuple_start)
            (expression
              (collection_value
                (object
                  (object_start)
                  (object_elem
                    (expression
                      (variable_expr
                        (identifier)))
                    (expression
                      (literal_value
                        (string_lit
                          (quoted_template_start)
                          (template_literal)
                          (quoted_template_end)))))
                  (object_elem
                    (expression
                      (variable_expr
                        (identifier)))
                    (expression
                      (literal_value
                        (string_lit
                          (quoted_template_start)
                          (template_literal)
                          (quoted_template_end)))))
                  (object_elem
                    (expression
                      (variable_expr
                        (identifier)))
                    (expression
                      (literal_value
                        (numeric_lit))))
                  (object_elem
                    (expression
                      (variable_expr
                        (identifier)))
                    (expression
                      (collection_value
                        (tuple
                          (tuple_start)
                          (expression
                            (variable_expr
                              (identifier))
                            (get_attr
                              (identifier))
                            (get_attr
                              (identifier)))
                          (tuple_end)))))
                  (object_end))))
            (expression
              (collection_value
                (object
                  (object_start)
                  (object_elem
                    (expression
                      (variable_expr
                        (identifier)))
                    (expression
                      (literal_value
                        (string_lit
                          (quoted_template_start)
                          (template_literal)
                          (quoted_template_end)))))
                  (object_elem
                    (expression
                      (variable_expr
                        (identifier)))
                    (expression
                      (literal_value
                        (string_lit
                          (quoted_template_start)
                          (template_literal)
                          (quoted_template_end)))))
                  (object_elem
                    (expression
                      (variable_expr
                        (identifier)))
                    (expression
                      (collection_value
                        (tuple
                          (tuple_start)
                          (expression
                            (variable_expr
                              (identifier))
                            (get_attr
                              (identifier))
                            (get_attr
                              (identifier)))
                          (tuple_end)))))
                  (object_elem
                    (expression
                      (variable_expr
                        (identifier)))
                    (expression
                      (literal_value
                        (numeric_lit))))
                  (object_end))))
            (tuple_end)))))))
