Skip to content

Commit

Permalink
HCL - comments in multilines for (#4858)
Browse files Browse the repository at this point in the history
* UT for #4857

* Fixing lexer to accept comemnts within for expressions

* licenseFormat
  • Loading branch information
greg-at-moderne authored Jan 7, 2025
1 parent 15f7751 commit fd71955
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 280 deletions.
4 changes: 2 additions & 2 deletions rewrite-hcl/src/main/antlr/HCLLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ lexer grammar HCLLexer;
private Stack<String> heredocIdentifier = new Stack<String>();
}

FOR_BRACE : '{' (WS|NEWLINE)* 'for' WS;
FOR_BRACK : '[' (WS|NEWLINE)* 'for' WS;
FOR_BRACE : '{' (WS|NEWLINE|COMMENT|LINE_COMMENT)* 'for' WS;
FOR_BRACK : '[' (WS|NEWLINE|COMMENT|LINE_COMMENT)* 'for' WS;

IF : 'if';
IN : 'in';
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit fd71955

Please sign in to comment.