Repository: amplify-education/python-hcl2 (language: python)

Issue:
Error parsing empty blocks with newlines
The following is valid HCL
```
variable "options" {
  type        = map
  default = {
    # explanatory comment
  }
}
```

However, this fails with:
```
  File "python3.8/site-packages/lark/parsers/lalr_parser.py", line 89, in feed_token
    raise UnexpectedToken(token, expected, state=state, puppet=None)
lark.exceptions.UnexpectedToken: Unexpected token Token('RBRACE', '}') at line 29, column 3.
``` 

The problem seems to be objects on the value side of an expression that contain newlines, but no keys. The snippet above is parsed correctly if the `default`value is instead written as `default = {}`


Discussion / hints:

Fix patch:
diff --git a/hcl2/hcl2.lark b/hcl2/hcl2.lark
index 98eed25..c436075 100644
--- a/hcl2/hcl2.lark
+++ b/hcl2/hcl2.lark
@@ -46,7 +46,7 @@ DECIMAL : "0".."9"
 EXP_MARK : ("e" | "E") ("+" | "-")?
 
 tuple : "[" (new_line_or_comment? expression (new_line_or_comment? "," new_line_or_comment? expression)* new_line_or_comment? ","?)? new_line_or_comment? "]"
-object : "{" (new_line_or_comment? object_elem (new_line_and_or_comma object_elem )* new_line_and_or_comma?)? "}"
+object : "{" new_line_or_comment? (object_elem (new_line_and_or_comma object_elem )* new_line_and_or_comma?)? "}"
 object_elem : (identifier | expression) ("=" | ":") expression
 
 heredoc_template : /<<(?P<heredoc>[a-zA-Z][a-zA-Z0-9._-]+)\n(?:.|\n)+?\n+\s*(?P=heredoc)/


Test patch:
diff --git a/test/helpers/terraform-config-json/variables.json b/test/helpers/terraform-config-json/variables.json
index d4fdb94..56f5874 100644
--- a/test/helpers/terraform-config-json/variables.json
+++ b/test/helpers/terraform-config-json/variables.json
@@ -21,6 +21,11 @@
           }
         ]
       }
+    },
+    {
+      "options": {
+        "default": [{}]
+      }
     }
   ],
   "locals": [
@@ -43,4 +48,4 @@
       ]
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/test/helpers/terraform-config/variables.tf b/test/helpers/terraform-config/variables.tf
index 565bd82..0fb2021 100644
--- a/test/helpers/terraform-config/variables.tf
+++ b/test/helpers/terraform-config/variables.tf
@@ -24,6 +24,11 @@ variable "azs" {
   }
 }
 
+variable "options" {
+  default = {
+  }
+}
+
 locals {
   route53_forwarding_rule_shares = {
     for forwarding_rule_key in keys(var.route53_resolver_forwarding_rule_shares) :