Expose draft tree traversal on GrammarMatcher (#613)
## Summary - Move draft tree traversal into the public GrammarMatcher API for C++ and Python callers. - Keep the Python testing wrapper as a backward-compatible shim while removing the C++ testing free function. - Update speculative decoding tests to cover the member API and compatibility wrapper. ## Validation - cmake --build build -j2 - python -m pytest tests/python/test_speculative_decoding.py - python -m ruff check python/xgrammar/matcher.py python/xgrammar/testing.py tests/python/test_speculative_decoding.py - git diff --check
Y
Yixin Dong committed
fc9b5daa6cb2447da010e991bf9ece64349371e5
Parent: 1912de2
Committed by GitHub <noreply@github.com>
on 5/1/2026, 9:31:34 AM