Move _skip and _parse_number functions to C extension module #740
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moves the
_skipand_parse_numberfunctions from_parser.pyto a new C extension module_skip_ext.cto make room for future parser enhancements.Changes
Build system: Switched from
uv_buildtosetuptoolsto support C extensionssetup.pydefining the extension modulepyproject.tomlwith setuptools configurationC extension (
_skip_ext.c): 400+ line implementation handling://) with backslash line continuation/* */) with proper error on unclosed blocksnewline_okparameter to control newline handlingParser module: Replaced Python implementations with imports from C extension
_skip: Direct import from C extension (44 lines removed)_parse_number: Wrapper that calls C version and converts exceptions (32 lines removed)_IS_POSSIBLE_FLOAT,_IS_POSSIBLE_INTEGER)Both C functions maintain identical behavior to the Python versions. All 68 parsing tests pass.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.