Tweaks and docs

This commit is contained in:
Bruce Hill 2020-09-14 11:36:16 -07:00
parent 57669a2d70
commit 45c4fb1049
2 changed files with 6 additions and 2 deletions

4
bpeg.1
View File

@ -145,6 +145,10 @@ be a string, and it may contain references to captured values: \fB@0\fR
Will match only if \fI<pat1>\fR and \fI<pat2>\fR both match and have the exact
same length. Pronounced \fI<pat1>\fB-assuming-it-equals-\fI<pat2>\fR
.B |
This pattern matches the indentation at the beginning of a line that has the
same indentation as the line before (or zero indentation on the first line).
.B (/)
The empty string (a pattern that always matches).

View File

@ -8,8 +8,8 @@ only-matches = +{...@pattern=>'@1\n'};
matching-line = +(..@pattern) ..$;
# Helper definitions (commonly used)
indent = \n |+(\t/' ');
dedent = >(\n !|);
indent = \n|+(\t/' ');
dedent = $ !(\n|);
indented-block = |` ..$ *(\n|..$);
crlf = \r\n;
cr = \r; r = \r;