diff options
| author | EuAndreh <eu@euandre.org> | 2025-07-15 21:37:16 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2025-07-15 21:44:55 -0300 |
| commit | 1ce80e005a374488c186d0f545af33096f6523d5 (patch) | |
| tree | 997f02f05a40d1fab2c9854dfdf5c687b8bb47c7 /Makefile | |
| parent | Support tokenizing `.` wildcard operator. (diff) | |
| download | paca-1ce80e005a374488c186d0f545af33096f6523d5.tar.gz paca-1ce80e005a374488c186d0f545af33096f6523d5.tar.xz | |
Only tolerate escaping of special chars
* src/paca.mjs
(escapingStateStep): Return an error when escaping non-metacharacters.
This way cases like \d, which is syntax for [0-9] which will
eventually be recognized, will not change its behaviour from a noop
escape of "d" to matching digits.
(operatorChars, isOperator): Hoist both of these up before their usage
in `escapingStateStep()`.
* tests/paca.mjs
(test_isOperator): Hoist its definition and position inside the
`runTests([...])` array to match src/paca.mjs.
(test_escapingStateStep): Adjust existing cases and add test case for
good/bad escapes.
(test_tokenizeRegexStep): Fix bad starting escape, that broke because
it was escaping a non-metacharacter.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions
