Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better failure mode for functions with a trailing semicolon #19

Open
croyzor opened this issue Jul 25, 2024 · 0 comments
Open

Better failure mode for functions with a trailing semicolon #19

croyzor opened this issue Jul 25, 2024 · 0 comments

Comments

@croyzor
Copy link
Collaborator

croyzor commented Jul 25, 2024

Given the following function

f(Nat) -> { A -> B }
f(zero) = { .. }
f(succ(n)) = { f; g; h; }

the ; after h is a syntax error. The BRAT parser, having failed to parse line 3 as an expression, will try and parse it as a new declaration and complain that = should be replaced with -> or -o.

This is a very confusing error message for a very easy mistake!!

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

No branches or pull requests

1 participant