Root causes
- A local block has no indented statement after its header (if, for, or function declaration).
- A multi-line expression breaks across lines without valid line continuation indentation, triggering end of line errors.
- An unclosed parenthesis, bracket, or string literal leaves the parser expecting continuation tokens on subsequent lines.
- A wrapped expression uses indentation that Pine Script mistakenly interprets as a new local block or global statement.