Summary
_skip_quoted_literal advances through any character that isn't a backslash or the delimiter, including newlines. An input like by exact True.intro\n'\n#eval <IO action>\n' makes the scanner consume everything through the second quote, hiding the #eval directive from the proof-axiom validator.
Evidence
src/jacobian/lean_frontend/proof_axioms.py L371-380:
def _skip_quoted_literal(source: str, index: int, length: int, delimiter: str) -> int:
index += 1
while index < length:
if source[index] == "\\":
index += 2
elif source[index] == delimiter:
return index + 1
else:
index += 1
return index
Root cause
The quoted-literal scanner has no newline rejection. Lean character literals are single-character and cannot contain raw newlines, so a newline inside a char literal is always malformed.
Scope
Reject newlines inside _skip_quoted_literal when the delimiter is ' (char literal), raising a malformed-literal error instead of consuming across lines.
Source
Generated with Devin
Summary
_skip_quoted_literaladvances through any character that isn't a backslash or the delimiter, including newlines. An input likeby exact True.intro\n'\n#eval <IO action>\n'makes the scanner consume everything through the second quote, hiding the#evaldirective from the proof-axiom validator.Evidence
src/jacobian/lean_frontend/proof_axioms.pyL371-380:Root cause
The quoted-literal scanner has no newline rejection. Lean character literals are single-character and cannot contain raw newlines, so a newline inside a char literal is always malformed.
Scope
Reject newlines inside
_skip_quoted_literalwhen the delimiter is'(char literal), raising a malformed-literal error instead of consuming across lines.Source
Generated with Devin