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

--emit-lua: Don't preserve comments inside type annotations #629

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

hugomg
Copy link
Member

@hugomg hugomg commented Aug 25, 2024

I'm looking for ways to simplify the --emit-lua back end, and perhaps even move it to a separate tool instead of the Pallene compiler itself.

The first step is to remove the feature of preserving comments inside type annotations that would be erased. It is not worth the complexity.

  1. The lexer:next() used to return COMMENT tokens
  2. The parser used to have to care about said COMMENT tokens
  3. The comment_regions logic was subtle and needed many test cases.

I'm looking for ways to simplify the --emit-lua back end, and perhaps
even move it to a separate tool instead of the Pallene compiler itself.

The first step is to remove the feature of preserving comments inside
type annotations that would be erased. It is not worth the complexity.

1. The lexer:next() used to return COMMENT tokens
2. The parser used to have to care about said COMMENT tokens
3. The comment_regions logic was subtle and needed many test cases.
@hugomg hugomg force-pushed the dont-preserve-comments branch from faef803 to 12138fa Compare August 25, 2024 15:49
@hugomg hugomg merged commit d14cdbb into master Aug 31, 2024
2 checks passed
@hugomg hugomg deleted the dont-preserve-comments branch August 31, 2024 16:25
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.

1 participant