JKTKops / JKTKops/cspim

Better Error Reporting

Open
#5 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Since the Parser already translates to the intermediate rep, pretty much all _syntactic_ errors that would need to be reported to the user (aka, not mismatched types, but everything else) should be reported by the parser. Unfortunately, since we plan on depending on GCC -E to do preprocessing for us, we can't get accurate source locations.

However we are using a recursive descent parser, which means we always know exactly the _syntatic_ structure that led us to where we are. Therefore one option is to report, for example:

```
Out of scope variable: `foo'
* in the definition for function: `bar'
* inside a block-type if-statement
* inside a one-line while loop
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.