cache_key

Function cache_key 

Source
pub fn cache_key(s: &ParserState) -> (i32, i32, i32, i32)
Expand description

The C++ uses two equality notions; we model the parsing one as PartialEq (all fields). The cache notion ignores rule_start_pos and repeat_count — see cache_key.

cache_key returns the tuple the C++ StateHashForCache / StateEqualForParsing-minus-position uses to deduplicate states when computing the acceptable-token mask. Consumed by the W6 GrammarMatcher token-mask cache.