Cleaner error handling in AIDL.
This encompasses a couple of things:
- enable %debug-error (syntax errors are meaningful). Here,
we also remove other error messages that are more or less
the same as these.
- use Parser::error_. Before, this variable wasn't used, now
we are using it when we read the 'error' token. Before,
compilation was just failing later.
- don't pass through unknown characters as identifiers, rather
throw an error.
Bug: 110758329
Test: runtests.sh
Test: Adding smiley face to INamedCallback.aidl line 20, column 20
system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl:20.20: syntax error, unexpected unrecognized character
Test: Adding multiple errors to different parts of files and seeing multiple errors.
Test: build and boot AOSP
Change-Id: I1bc9df8781b6d1344d05f2fb1e4827e954ad8da1
4 files changed