hclsyntax: Recovery of outer ObjectConsExpr
with incomplete nested ObjectConsExpr
#597
Labels
ObjectConsExpr
with incomplete nested ObjectConsExpr
#597
Currently when the configuration contains nested object expressions where the inner one is incomplete, such as
this trips up the parser and results in the
foo
item not being reported at all.Here's a test to demonstrate the behaviour:
which fails in the following way:
I expect the inner (incomplete) object to not be parsed, but it would still be very helpful to have the outer object(s) parsed correctly.
The reason this is important is because it would enable "partial" completion in an IDE, where
bar
may be exact attribute name, or beginning of an attribute name. We can recover the 3 bytes ofbar
, but it makes it very difficult/impossible to understand where we are in the config if the remaining outer object isn't returned by the parser.The text was updated successfully, but these errors were encountered: