Skip to content

Simplify TokenSpec in CodeGeneration #1943

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

Merged
merged 3 commits into from
Jul 26, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jul 24, 2023

Three cleanups to TokenSpec:

  • Flatten the TokenSpec class hierarchy (which dates back to the Python days) into a single struct
  • Remove TokenSpec.associatedValueClass: At some point I introduce the abstraction with the idea to also have a TokenKind with associated values for pound keywords and operators but that never happened
  • Rename TokenSpec.swiftKind to varOrCaseName and change it from a string to TokenSyntax.

@ahoppen ahoppen requested a review from bnbarham July 24, 2023 16:37
@ahoppen
Copy link
Member Author

ahoppen commented Jul 24, 2023

@swift-ci Please test

@ahoppen ahoppen force-pushed the ahoppen/simplify-tokenspec branch from bd93fbd to 95328cc Compare July 25, 2023 16:32
@ahoppen
Copy link
Member Author

ahoppen commented Jul 25, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Jul 25, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit cb134fa into swiftlang:main Jul 26, 2023
@ahoppen ahoppen deleted the ahoppen/simplify-tokenspec branch July 26, 2023 22:21
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.

3 participants