Skip to content

Use character instead of byte count for parse#2859

Open
vinistock wants to merge 1 commit intoruby:masterfrom
Shopify:vs_use_character_count_for_instantiating_parser
Open

Use character instead of byte count for parse#2859
vinistock wants to merge 1 commit intoruby:masterfrom
Shopify:vs_use_character_count_for_instantiating_parser

Conversation

@vinistock
Copy link

This commit updates the Rust crate's parse function to use character count instead of byte count when invoking the underlying C parser. This fixes an issue with multibyte characters in RBS. Parsing the included RBS files was crashing on the assert for rbs_skip.

This commit also exposes the parse function's error message to provide more informative feedback when parsing fails.

Finally, an integration sanity test is added to ensure that all RBS included in the repo can be correctly parsed.

This commit updates the Rust crate's parse
function to use character count instead of byte
count when invoking the underlying C parser. This
fixes an issue with multibyte characters in RBS.

This commit also exposes the parse function's
error message to provide more informative feedback
when parsing fails.

Finally, an integration sanity test is added to
ensure that all RBS included in the repo can be
correctly parsed.
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