Commit 20030ff
committed
Add option --invert-captures.
The new option inverts the meaning on capturing and non-capturing
parentheses: `(! ...)` becomes capturing, and `( ... )` becomes
non-capturing, including the implicit whole-regexp group, which also
becomes non-capturing.
The idea of the new option is to let the user decide which gropus should
be capturing and which are purely structural, and explicitly mark only
the capturing ones for submatch extraction.1 parent 338806b commit 20030ff
9 files changed
Lines changed: 1395 additions & 1334 deletions
File tree
- bootstrap
- lib
- src
- options
- parse
- lib
- src
- options
- parse
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
1147 | | - | |
| 1147 | + | |
1148 | 1148 | | |
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | | - | |
| 1153 | + | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
| |||
0 commit comments