Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pg_query.proto: Add Token ASCII_36; Add scan test (#211)
Postgres's scanner will scan $ into a single token. For example: SELECT $identifier; The parser will later reject this. However, since the scanner returns this value, we should define a Token for it in the protobuf. test/scan.c: * Add a check so the test does not crash if token_kind is NULL, which it was before I defined the token. The test now prints an error: INVALID result for "...": scan_result token 1 token_kind == NULL * Make tests constant to prevent accidental modification. Unnecessary but could be helpful. * Define testsCount automatically so it no longer needs to be changed. * Add an assert to help ensure tests are defined correctly.
- Loading branch information