Core match: determines if characters at a given position match entries in this map. Uses a loop-based approach to handle variable-length sequences. Always normalizes digits to "1" for matching (harmless for maps without digit entries). Subclasses can wrap this with peek() for higher-level behaviour; callers can call eat() directly.
| chunk |
The text chunk to examine |
| chunk_pos |
The position in the chunk to check |
| is_end_of_chunks |
If true, markers at the end are treated as definitive |
| matched_type |
Output parameter for the matched format type (NONE if no match) |
| byte_length |
Output parameter for the byte length of the match |
|
1-N: Length of the match, 0: No match found, -1: Cannot determine (need more characters) |