diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-27 01:41:15 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-01 15:06:12 +0200 |
| commit | 09e75bb48f7eeeac95bb61bbe2b2d0fc1b368067 (patch) | |
| tree | 47169a079c1eff12f41e7cfc1534ea9d7553987b /validation/preprocessor | |
| parent | 573953f358dcb77308532d8e2020bf045213acc6 (diff) | |
| download | sparse-dev-09e75bb48f7eeeac95bb61bbe2b2d0fc1b368067.tar.gz | |
avoid multiple error message after parsing error
Parsing error triggered by expect() insert bad_token as the
current token. This allows to skip other errors with expect().
So far so good but this token is a fake token which has no
position set, if another parsing error is detected by something
else than expect(), the error message will use the position of
this bad token which will be displayed like:
builtin:0:0: ...
which is confusing.
Since the concerned error message are secondary ones, the primary
one have been already be repported by expect(), the best is to
simply skip all these secondary error messages.
Do this by creating a new token type (TOKEN_BAD) and use it for
bad_token, then filter error messages based on this token type.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/preprocessor')
0 files changed, 0 insertions, 0 deletions
