mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-05-16 12:33:04 -04:00
Per Monarch docs, the proper way to make a tokenizer case-insensitive is `ignoreCase: true` at the language level — flags on individual regex literals appear to be ignored by Monarch's parser. Switched the algol68 mode and the converter (`-i`) to emit `ignoreCase: true`, dropped the redundant `/i` suffixes. Also fixed a CodeQL warning in tm-to-monarch's regex literal escaping: the previous one-liner `re.replace(/\//g, '\\/')` didn't account for backslashes, so inputs containing `\/` would emit malformed literals. Replaced with a char-by-char walk that preserves escape sequences and only escapes truly unescaped slashes; warns on stray trailing backslash. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>