diff options
| author | EuAndreh <eu@euandre.org> | 2025-07-15 21:11:37 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2025-07-15 21:44:44 -0300 |
| commit | e808ad60c1a2b4f7793fd4ba5b70db37039fb1ea (patch) | |
| tree | c2e5fd66f72ec2a1e11ba49005ad7d6dc1b0b428 /mkdeps.sh | |
| parent | Support tokenizing `^` and `$` anchors (diff) | |
| download | paca-e808ad60c1a2b4f7793fd4ba5b70db37039fb1ea.tar.gz paca-e808ad60c1a2b4f7793fd4ba5b70db37039fb1ea.tar.xz | |
Support tokenizing `.` wildcard operator.
* src/paca.mjs
(isTransition): Add new function as an improved version of the raw
usage of `stateTransitionOperators`, equivalent to `isAnchor()` and
`isOperator()`.
(operatorChars, isOperator): Add new static set `operatorChars` as
backing data of `isOperator()`, instead of ad-hoc conditional in its
implementation. Also now add the `.` character as an operator by
including it in the `operatorChars` set.
(tokenizeRegexStep): Use the new `isTransition()` function instead of
checking the set directly. Also tweak ternary to fit in 80 columns.
(PRECEDENCE): Add `.` operator with lowest precedence, as it is not
really operating on anything, and is instead a target to be operated
on.
* tests/paca.mjs
(test_isTransition): Add obligatory test cases.
(test_isOperator): Include test case for `.` wildcard operator.
Diffstat (limited to 'mkdeps.sh')
0 files changed, 0 insertions, 0 deletions
