feat:(engine): add parser engine lib#3
Merged
tomdavidson merged 15 commits intomainfrom Mar 24, 2026
Merged
Conversation
…nce bugs Test restructuring: - Split monolithic integration_tests/mod.rs into focused modules: normalize_join, normalize_join_classify, spec_examples - Move parse_document orchestration tests to engine/tests/parse_document.rs - Extract shared test helpers (valid_command_name, feed_body) into test_helper.rs - Rename spec example tests from A-numbering to B-numbering (Appendix B) - Scope parse.rs #[cfg(test)] to private internals only (split_physical_lines, fold_physical_lines, accumulate_text, flush_text, ParseCtx::into_result) Bug fixes: - classify: replace char::is_whitespace with is_wsp (SP/HTAB only) per Engine Spec §6 for leading WSP, name/args separator, and fence lang-id - classify: fence_lang now returns None for empty string after trimming (RFC §5.2.1 "if non-empty") - fence: is_fence_closer uses trim_matches(is_wsp) instead of .trim() per Engine Spec §6 - fence: unclosed fence warning type changed from "unclosed-fence" to "unclosed_fence" per Engine Spec §11/§16.3 - join: remove space insertion on join, matching Engine Spec §7.1 POSIX backslash-newline semantics - parse: hoist raw/range construction above match in start_new_command New test coverage: - NBSP/EM SPACE rejection in classify leading WSP and fence closer - NBSP/EM SPACE acceptance in fence lang-id (NONWSP per ABNF) - Tab handling for leading WSP, name separator, and fence closer - Fence closer edge cases (interspersed spaces, 4-tick openers, tildes) - Fence header/lang passthrough, warning type snakecase - Property tests for fence accumulation invariants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.