pub fn preprocess_semicolons(source: &str) -> StringExpand description
Automatic semicolon insertion preprocessor.
Resolves newline ambiguities where [...] or (...) on a new line could
be parsed as index access or function call (Pest’s greedy postfix matching).
Inserts ; at the end of lines where:
- The line ends with a statement-ending token (identifier char,
),],},") - The next non-empty line starts with
[or(
This mirrors Go’s automatic semicolon insertion strategy.