Skip to content

Add postlexer to support multiline binary operators and ternary expressions - #270

Merged
kkozik-amplify merged 1 commit into
release/8.xfrom
multiline-exprs
Mar 11, 2026
Merged

kkozik-amplify merged 1 commit into
release/8.xfrom
multiline-exprs

Conversation

@kkozik-amplify

Copy link
Copy Markdown
Collaborator

relates to #269 and #142

@kkozik-amplify
kkozik-amplify marked this pull request as ready for review March 10, 2026 17:14
@kkozik-amplify
kkozik-amplify requested a review from a team as a code owner March 10, 2026 17:14
Comment thread CLAUDE.md
Comment on lines 104 to 108
1. Add grammar rules to `hcl2.lark`
1. If the new construct creates LALR ambiguities with `NL_OR_COMMENT`, add a postlexer pass in `postlexer.py`
1. Create rule class(es) in the appropriate `rules/` file
1. Add transformer method(s) in `transformer.py`
1. Implement `serialize()` in the rule class

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to fix numeric?

@kkozik-amplify kkozik-amplify Mar 10, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm weird. Numbers were automatically changed to 1. by markdown format pre-commit hook. Funnily enough it looks fine in the reading view
image
Apparently its the recommended practice
typora/typora-issues#1188

@kkozik-amplify
kkozik-amplify requested a review from rddimon March 10, 2026 17:31
@kkozik-amplify
kkozik-amplify merged commit 2dd72b7 into release/8.x Mar 11, 2026
7 checks passed
@kkozik-amplify
kkozik-amplify deleted the multiline-exprs branch March 11, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants