diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-26 14:26:30 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-26 17:04:29 +0200 |
| commit | 6b6daa5c58388e758b51dee97aeacb9944daf9d2 (patch) | |
| tree | 442ee77927baa59cee4d686c6993ccb263107645 /validation | |
| parent | 943416a743501230f89879fa63d8186694df2e55 (diff) | |
| download | sparse-dev-6b6daa5c58388e758b51dee97aeacb9944daf9d2.tar.gz | |
add helper for new parsing errors: unexpected()
Most parsing errors are reported during parsing itself but
sometimes some extra conditions must be checked.
One problem with this is that these extra conditions are not
met because they are the consequence of a primary error which
has already been reported. In this case, it this not desirable
to emit a new error message.
To help with this, add a small function which will emit an
error message followed by the current token but only if the
current token does not originated from a previous parsing error.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
0 files changed, 0 insertions, 0 deletions
