Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ignoring indentation within delimiters #1608

Merged
merged 6 commits into from
Aug 21, 2024

Conversation

aabounegm
Copy link
Member

Added an option to the IndentationAwareTokenBuilder that makes use of multi-mode lexing to support turning off indentation sensitivity inside some range of tokens (for example, between '(' and ')')

@msujew msujew added the parser Parser related issue label Aug 8, 2024
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

I've deduplicated some code in my latest commit. Looks good to me now 👍

@msujew msujew merged commit ceba584 into eclipse-langium:main Aug 21, 2024
4 checks passed
@aabounegm aabounegm deleted the ignore-indentation-delimiters branch August 21, 2024 15:43
@msujew msujew added this to the v3.2.0 milestone Aug 22, 2024
@aabounegm
Copy link
Member Author

@msujew Actually, I just remembered another reason I didn't previously allow keyword tokens: the generated type (from #1586) includes only terminal tokens. I'll try to submit another PR that adds keyword tokens as well to the type.

@aabounegm aabounegm mentioned this pull request Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Parser related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants