Skip to content

Allow comments between intersection types and by-ref params #10084

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

Conversation

iluuu1994
Copy link
Member

@olleharstedt Can you test if this works for you?

@iluuu1994 iluuu1994 force-pushed the allow-comments-between-intersection-types branch from 54abed8 to c74832f Compare December 12, 2022 00:10
@olleharstedt
Copy link

As mentioned in the discussion on the chat, there's no non-greedy setting for re2c? For me it's totally fine to instead have

OPTIONAL_WHITESPACE_AND_COMMENTS ({OPTIONAL_WHITESPACE}|{SINGLE_LINE_COMMENT}|{HASH_COMMENT})*

without the MULTI_LINE_COMMENT. But maybe such an inconsistency would not be appreciated?

I can also try https://stackoverflow.com/questions/11898998/how-can-i-write-a-regex-which-matches-non-greedy

@iluuu1994
Copy link
Member Author

Allowing half the comments seems worse to me than no comments, as it's completely incomprehensive for end users...

@iluuu1994
Copy link
Member Author

I don't think this is feasible until re2c properly supports lazy matching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants