Skip to content

Improved error messages on parser failures#213

Draft
AlexanderViand wants to merge 1 commit intomainfrom
alex/parser-error-msg
Draft

Improved error messages on parser failures#213
AlexanderViand wants to merge 1 commit intomainfrom
alex/parser-error-msg

Conversation

@AlexanderViand
Copy link
Contributor

Adds better error messages on parser failures, for example:

Error: Error parsing operation: attribute expected
at line 8, column 52 (byte 422) near token exclamationIdent '!felt.type'
      "struct.member"() <{sym_name = "val", type = !felt.type}> {llzk.pub} : () -> ()

Also, vibe-coded by AI and zero testing, but @math-fehr wanted to have this here

Warning: 100% LLM-coded 🤖
@math-fehr
Copy link
Collaborator

I'll take care of this PR, but I'll actually change most of the code.
I think we want to create a new ParserError structure and return this instead of a String on all our parser errors.
While this works, it's only a bandage solution and I prefer writing the real thing first.

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.

2 participants