Krikri::PythonPattern
Class methods
Full "compile it the way Python would" check: nil when the pattern is valid under Python's own parser AND PCRE2, otherwise the re.error text Python's executor would wrap. Lets a plugin express the scan + compile + translate pipeline as one question instead of repeating its three steps.
Translates a PCRE2 compile error (Crystal's wording, " at <byte offset>" suffix) into the re.error text Python's own parser raises for the same pattern, wherever the mapping is exact. PCRE2's offsets count BYTES; Python's re.error positions count CHARACTERS of the pattern as the user wrote it, so the offset goes byte -> translated char -> source char (the \uXXXX/\Uhhhhhhhh rewrites can move it). Cases without an exact mapping keep the PCRE2 wording - still inside the crash wrapper, which is the part users actually script against.
Whether the '}' at chars[close] closes a real {m,n}/ quantifier (used to tell Python's "multiple repeat" from "nothing to repeat" when PCRE2 reports an unusable quantifier after a brace).