This repository has been archived by the owner on Oct 3, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hcl/hclsyntax: Allow newline between { and "for" keyword
We were previously enabling newline-sensitivity too soon, before checking for the "for" keyword, and thus seeing the newline token instead of the for token when peeking ahead. Now we peek for the for token first and turn on newline-sensitivity only if it isn't present. This fixes another bug in turn where we would previously have parsed the for expression itself in newline-sensitive mode, which we no longer do because we delegate to the for expression parser sooner.
- Loading branch information