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

feat(smcache): Expose token name via Python bindings #703

Merged
merged 1 commit into from
Oct 31, 2022

Conversation

kamilogorek
Copy link
Contributor

Followup to #698

@kamilogorek kamilogorek requested a review from a team October 31, 2022 13:03
@@ -156,6 +158,7 @@ fn make_token_match(token: SourceLocation, context_lines: u32) -> *mut SymbolicS
line: token.line() + 1,
col: token.column() + 1,
src: SymbolicStr::new(token.file_name().unwrap_or_default()),
name: SymbolicStr::new(token.name().unwrap_or_default()),
Copy link
Member

Choose a reason for hiding this comment

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

The unwrap_or_default means we will return an empty string in case there is no name. is that really what we want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because decode_str will then return '', which then will fallback to None in sourcemapcache.py

@kamilogorek kamilogorek merged commit 85a1756 into master Oct 31, 2022
@kamilogorek kamilogorek deleted the sourcemapcache-token-name branch October 31, 2022 13:28
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.

None yet

2 participants