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

Copy token string when using FeatCtx::tokstr() #1372

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

iterumllc
Copy link
Collaborator

Description

I had thought that std::string objects retrieved from the parser tree are valid for the lifetime of the tree but there seems to be some other smart-pointer stuff going on. In most cases there is no difference (because strings are either used in the function where they're retrieved or passed "down") but FeatCtx::tokstr() needs to be changed to store the string.

I also changed the "reference token" for feature blocks to the start tag so that the error message makes sense. (That would have been a better choice to begin with anyway.)

Checklist:

  • I have followed the Contribution Guidelines
  • I have added test code and data to prove that my code functions correctly
  • I have verified that new and existing tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Copy link
Collaborator

@kaydeearts kaydeearts left a comment

Choose a reason for hiding this comment

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

👍 Thanks for this quick fix!

@kaydeearts kaydeearts merged commit 6432278 into adobe-type-tools:develop Jun 9, 2021
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