Skip to content

Sanitization#39

Merged
flupe merged 2 commits intomasterfrom
sanitization
Feb 2, 2026
Merged

Sanitization#39
flupe merged 2 commits intomasterfrom
sanitization

Conversation

@flupe
Copy link
Collaborator

@flupe flupe commented Jan 14, 2026

Closes #22.

The approach is similar to agda2rust, with some extra things:

If the name is a valid rust keyword, it is converted into a raw identifier (i.e prefixed with r#).
If the name is not allowed as a raw identifier, prefixed with a delimiter.
Otherwise, we check compliance as a Rust identifier (using XIDStart & XIDContinue). Invalid chars are prefixed using a specific delimiter, and we show either their hexcode or a shorthand for common symbols.

@flupe flupe marked this pull request as ready for review January 14, 2026 15:56
@flupe flupe merged commit 0ae86e9 into master Feb 2, 2026
2 checks passed
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.

Name sanitization

1 participant