Skip to content

Keep original source text in parse error messages - #20

Merged
barrybecker4 merged 2 commits into
masterfrom
cursor/parse-error-source-text-6817
Nov 8, 2026
Merged

barrybecker4 merged 2 commits into
masterfrom
cursor/parse-error-source-text-6817

Conversation

@barrybecker4

Copy link
Copy Markdown
Member

Parse failures now name the expression the caller typed.

Trailing operators such as 1+ report against that full text (with a character offset) instead of an empty source and an internal ListBuffer dump. Extra open parentheses such as ((x) are reported against the full input instead of a sliced substring like (x. Simple mismatches like (x+1 continue to include the original source.

Fixes #15

Open in Web Open in Cursor 

cursoragent and others added 2 commits November 8, 2026 14:47
Reject dangling operators during scan and require a true matching
close paren so ParseError reports the expression the caller typed
instead of an empty string or a sliced substring.

Co-authored-by: Barry G Becker <barrybecker4@yahoo.com>
Resolve ExpressionParser conflict by keeping source-aware makeTreeFromNodes
and findClosingParen mismatch checks, while adopting master's removal of
unused splice/isOperatorCell helpers.

Co-authored-by: Barry G Becker <barrybecker4@yahoo.com>
@barrybecker4
barrybecker4 merged commit 279a566 into master Nov 8, 2026
1 check passed
@barrybecker4
barrybecker4 deleted the cursor/parse-error-source-text-6817 branch November 8, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parse failures from the reducer and from extra open parens lose the source text

2 participants